MATLAB: Save data plot in GUI into a file, and may open it back

save and load

I got problem to save data in GUI. How to solve it? My project is about plot a graph, then I want it save in some file, so that next time I may open it back.

Best Answer

h=plot(x,y)
hgsave(h,'your_figure')
To open your_figure
hgload('your_figure')