Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Matlab GUI saving images 1

Status
Not open for further replies.

cinderblue

Electrical
Nov 21, 2005
4
0
0
US
Hi,
I've created a GUI using the guide program within Matlab V7. I have a few "axes" located on the layout, some that just show images, and one that plots data. I would like to save the plotted data, but I'm having problems figuring out how to grab the correct axes/object/image/?. The name of the axes is "main_graph". My idea was something like:
axes(handles.main_graph)
saveas(handles.main_graph,'testfile','bmp')

The problem is, more then just the main_graph object are saved (the entire GUI gets saved). What's the solution?

Thanks,
DJ
 
Replies continue below

Recommended for you

saveas saves the figure and not individual axes. It is my understanding that it is impossible to save individual axes. I was very frustrated about that myself since I needed to do it myself a while back. My solution was to open a new figure (even not a visible one, this doesn't matter), to plot only the requested plot in it and then to save it. It's a very ugly solution but it's the best I was able to find so far.

I would love it if someone will come up with a better solution...

Yoav.
 
Status
Not open for further replies.
Back
Top