×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Matlab GUI saving images

Matlab GUI saving images

Matlab GUI saving images

(OP)
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

RE: Matlab GUI saving images

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources