Saving pngs without plotting to screen first
Thomas Weber
thomas.weber.mail at gmail.com
Fri Jan 4 10:41:51 CST 2008
Am Freitag, den 04.01.2008, 08:55 +0000 schrieb Koen Tavernier:
> Hi,
>
> I want octave to create a lot of graphs and save them to pngs. I can do
> this without problem using the print function. Because a high number of
> these need generating, my system slows down considerably as gnuplot is
> drawing every plot onto the screen. I have tried to look for solutions
> in quite a few places, but I'm not sure what exactly I should be
> searching for. I'm sure it's something really trivial!
>
> This is the code that currently generates the graphs:
figure(1, "visible", "off");
% add this right before your code
> for j = 1:segment
> subplot(2,1,1);
> plot(phase([maxindex(j)-500:maxindex(j)+1500]));
> subplot(2,1,2);
> plot(unfiltered([maxindex(j)-500:maxindex(j)+1500]));
> title = sprintf("segment%d.png", j)
> print(title, "-dpng")
> endfor
Thomas
More information about the Help-octave
mailing list