Hello.

I have a saved matlab figure. I want to have the Y-axis data points and X-axis data points in the work space. for example assume I have already plotted y=2x for x=1:1:100. now I only have the saved figure. how can i extract x=[1:1:100] and y=[2:2:200] from that saved figure? Is there any solution to do so?

Thank you!

When you open the figure, the function gca will return the handle to the axis. You can then get handles for all the lines using the call

line_handles = get(gca,'children')

Then for each line on the plot

x = get(line_handles(1),'xdata');

y = get(line_handles(1),'ydata');

Amy

Hi Amy,

Could you please let me know how we can retrieve the data itself from the figure? Thanks,

Shahed

1. dock a matlab figure in another matlab figure

2. how to extract a point from a Matlab figure

3. matlab figure or drawing space without frame

4. how do i get MATLAB 5 to export a "Figure" to PNG or SVG?

5. export matlab figure to latex

6. export landscape Matlab figures as landscape pdf's

7. can't export matlab figure to other formats

8. Exporting figures in Matlab

9. Exporting matlab figures using 'print()' function

10. Is there a better way to export figures from Matlab?

11. how to export or convert matlab figure to autocad?

12. Exporting matlab figure to .eps without background

13. exporting figures makes Matlab crash

14. How to export figure with more points than shown on screen?

15. [Matlab 7.3.0] Exporting figure to image problem

3 post • Page:**1** of **1**