Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Save figure from GUIDE GUI

Subject: Save figure from GUIDE GUI

From: Enrico

Date: 15 Jul, 2010 21:56:06

Message: 1 of 4

I created a GUIDE gui with a figure (axes1).

I would like to be able to save only (axes1) to an image file (jpg)

if just use saveas(handles.axes,'test.jpg'), it saves the the gui buttons along with the figure with most of the figure cut off.

I tried creating a new figure and copying. This gave the same result, except in place of the gui buttons, I got a white box. The figure was still shifted over and it was still cut off.

f = figure;
copyobj(handles.axes1,f);
saveas(f,'test.jpg');


How can I save just the image without the gui.

Subject: Save figure from GUIDE GUI

From: Neil

Date: 16 Jul, 2010 03:52:04

Message: 2 of 4

"Enrico " <en@rcsnetwork.com> wrote in message <i1o05m$c4o$1@fred.mathworks.com>...
> I created a GUIDE gui with a figure (axes1).
>
> I would like to be able to save only (axes1) to an image file (jpg)
>
> if just use saveas(handles.axes,'test.jpg'), it saves the the gui buttons along with the figure with most of the figure cut off.
>
> I tried creating a new figure and copying. This gave the same result, except in place of the gui buttons, I got a white box. The figure was still shifted over and it was still cut off.
>
> f = figure;
> copyobj(handles.axes1,f);
> saveas(f,'test.jpg');
>
>
> How can I save just the image without the gui.

See this post
http://www.mathworks.com/matlabcentral/newsreader/view_thread/286208#760378

Subject: Save figure from GUIDE GUI

From: Enrico

Date: 16 Jul, 2010 13:28:07

Message: 3 of 4

>
> See this post
> http://www.mathworks.com/matlabcentral/newsreader/view_thread/286208#760378


I tried that but I got the same result.

my GUI has the controls on the left and the figure on the right.
when I copy the figure over, I do not see the controls, but the whole picture is shift over to the right leaving a space where the controls use to be. Also, eventhough, it copied the whole thing, the new figure is not sized to the whole picture so when I print or save, it is cut off.

Subject: Save figure from GUIDE GUI

From: Mateusz

Date: 27 Nov, 2012 23:51:16

Message: 4 of 4

"lmbgm" wrote in message <i1pmp7$nh1$1@fred.mathworks.com>...
> >
> > See this post
> > http://www.mathworks.com/matlabcentral/newsreader/view_thread/286208#760378
>
>
> I tried that but I got the same result.
>
> my GUI has the controls on the left and the figure on the right.
> when I copy the figure over, I do not see the controls, but the whole picture is shift over to the right leaving a space where the controls use to be. Also, eventhough, it copied the whole thing, the new figure is not sized to the whole picture so when I print or save, it is cut off.

I have the same problem. Anyone have got a solution ? ;/

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us