How to extract data points from a .fig scatter plot?

Hello
Dear experts,
I have a .fig scatter plot (actual data vs. predicted data), and I need to extract the data points. is the .fig file able to show the X and Y values?
Regards,

 採用された回答

dpb
dpb 2020 年 8 月 26 日

0 投票

openfig('YourFigFile.fig')
hSc=findobj(gcf,'Type','scatter');
.X|Y|ZData properties are available from the scatter object handle thus obtained.

3 件のコメント

Benjamin
Benjamin 2020 年 8 月 26 日
Thanks for your reply, however, it does not show the X and Y datapoints. This command only shows the "properties" that is already available on the property inspector window.
dpb
dpb 2020 年 8 月 26 日
編集済み: dpb 2020 年 8 月 26 日
Well, you have to retrieve them from the scatter object...I don't know what you mean by "show"...the command line echos the actual values if the arrays are of minimal size but you wouldn't want a 10,000 element vector scrolling across the command screen if that were the size of the figure.
X=hSc.XData;
etc., etc., ... Figured that would be obvious at that point.
Benjamin
Benjamin 2020 年 8 月 26 日
Thanks. This was excatly what I was looking for.

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

その他の回答 (0 件)

カテゴリ

タグ

質問済み:

2020 年 8 月 26 日

コメント済み:

2020 年 8 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by