Thread Subject: Don't display plot

Subject: Don't display plot

From: Luca Cerone

Date: 21 Jan, 2008 09:35:03

Message: 1 of 3

Hi, I need to save some of the graphics I obtain from my
calculations.

After having stored my results in two matrix X and Y,
i do this in the following way:

for i=1:size(X,1)
plot(X(i),Y(i))
savefig(filename{i},'png')
%(you can find the savefig function in the FLEX);
end

The function works, but each times it show the figure i need
to save.

I would like not to display the plot at each iteration,
is this possible?

Thank you very much in advance!


Subject: Don't display plot

From: Peter Bone

Date: 21 Jan, 2008 10:08:03

Message: 2 of 3

"Luca Cerone" <cerone@to-see.it> wrote in message
<fn1p07$eo6$1@fred.mathworks.com>...
> Hi, I need to save some of the graphics I obtain from my
> calculations.
>
> After having stored my results in two matrix X and Y,
> i do this in the following way:
>
> for i=1:size(X,1)
> plot(X(i),Y(i))
> savefig(filename{i},'png')
> %(you can find the savefig function in the FLEX);
> end
>
> The function works, but each times it show the figure i need
> to save.
>
> I would like not to display the plot at each iteration,
> is this possible?
>
> Thank you very much in advance!

Why don't you want to show them? To reduce the time it takes
to save the plots?
You can make the figure not visible like this
set(gcf, 'Visible', 'off')
You should only need to call that once before the for loop
(after creating a new figure).
Peter

Subject: Don't display plot

From: Luca Cerone

Date: 21 Jan, 2008 11:52:02

Message: 3 of 3

Yes, I want to reduce time ^_^
(and I want to be able to keep working, while it's saving
the plots, but each time a plot is created it pops up!)
Thank you very much for your advice ;)
"Peter Bone" <peterbone@hotmail.com> wrote in message
<fn1qu3$dtf$1@fred.mathworks.com>...
> "Luca Cerone" <cerone@to-see.it> wrote in message
> <fn1p07$eo6$1@fred.mathworks.com>...
> > Hi, I need to save some of the graphics I obtain from my
> > calculations.
> >
> > After having stored my results in two matrix X and Y,
> > i do this in the following way:
> >
> > for i=1:size(X,1)
> > plot(X(i),Y(i))
> > savefig(filename{i},'png')
> > %(you can find the savefig function in the FLEX);
> > end
> >
> > The function works, but each times it show the figure i need
> > to save.
> >
> > I would like not to display the plot at each iteration,
> > is this possible?
> >
> > Thank you very much in advance!
>
> Why don't you want to show them? To reduce the time it takes
> to save the plots?
> You can make the figure not visible like this
> set(gcf, 'Visible', 'off')
> You should only need to call that once before the for loop
> (after creating a new figure).
> Peter
>

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
file Luca Cerone 21 Jan, 2008 04:40:03
dont Luca Cerone 21 Jan, 2008 04:40:02
display Luca Cerone 21 Jan, 2008 04:40:02
figure Luca Cerone 21 Jan, 2008 04:40:02
save Luca Cerone 21 Jan, 2008 04:40:02
plot Luca Cerone 21 Jan, 2008 04:40:02
rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com