From: Aram on
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
From: Jan Simon on
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
From: Aram on
Wonderful, thank you!

> 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