How to read the coordinated from the plot in MATLAB 2018 version?

6 ビュー (過去 30 日間)
Lavanya
Lavanya 2022 年 6 月 20 日
コメント済み: Bjorn Gustavsson 2022 年 6 月 21 日
I have created GUI, in that I wanted add a feature that it should read the coordinates from the graph in MATLAB 2018 version. In this version there is no 'Current point' , and 'datacursor mode' is also not working for the app.UIFigure. Is there any alternative way to read the coordinates from the graph?
  3 件のコメント
Geoff Hayes
Geoff Hayes 2022 年 6 月 21 日
What errors are you observing in the 2021 version?
Bjorn Gustavsson
Bjorn Gustavsson 2022 年 6 月 21 日
It would be better if you thoroughly describe the functionality you had/have/and wish to have. First you talked about a graph, now you talk about showing images. Describe, in detail.

サインインしてコメントする。

回答 (1 件)

Bjorn Gustavsson
Bjorn Gustavsson 2022 年 6 月 21 日
If you make a simple graph:
ph = plot(X,Y);
Then you can always extract the data-points from the plot-handle ph:
xGraph = get(ph,'XData');
yGraph = get(ph,'YData');
From there you can display them any whichever way you see fit. However, a lot more can be presented in a graph, and this makes your question impossible to answer in a way that covers all graphs in general. Hopefully this is useful to your case.
HTH

カテゴリ

Help Center および File ExchangeDirected Graphs についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by