Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to suppress plot window?

328 views
Skip to first unread message

Aram

unread,
Mar 17, 2010, 11:54:05 AM3/17/10
to
I wrote an M-file to create a series of plots from a big data set, and to save each plot as a jpg with a unique file name. So far, so good. Now that it is working, I'd like to suppress the plot windows in Matlab. I don't need to see them, and there are rather a lot of them ... and I have to close them all manually. I'd like to code something that tells Matlab not to display them at all. (I'd still save the jpg files). Is this possible?

Or is it necessary to display a plot window in order to create the graphics handle? (I hope not!)

Thanks,
Aram

Jan Simon

unread,
Mar 17, 2010, 1:00:26 PM3/17/10
to
Dear Aram!

> I wrote an M-file to create a series of plots from a big data set, and to save each plot as a jpg with a unique file name. So far, so good. Now that it is working, I'd like to suppress the plot windows in Matlab. I don't need to see them, and there are rather a lot of them ... and I have to close them all manually. I'd like to code something that tells Matlab not to display them at all. (I'd still save the jpg files). Is this possible?
>
> Or is it necessary to display a plot window in order to create the graphics handle? (I hope not!)

Some ideas:
1. JPGs are usually not a good choice for saving plots. Compare the results with saving PNGs.
2. If you save the plots in your program, you can close the figures there also automatically using the CLOSE command.
3. Instead of closing all figure manually you can type:
close all

These 3 ideas are more stable than saving images of invisible figures. There have been some problems with UICONTROLs and updates of Java objects.

Good luck, Jan

Aram

unread,
Mar 17, 2010, 3:03:06 PM3/17/10
to
Wonderful, thank you!
0 new messages