[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving pngs without plotting to screen first

From: Søren Hauberg
Subject: Re: Saving pngs without plotting to screen first
Date: Fri, 04 Jan 2008 17:14:34 +0100

  A quick look at the archives tells me something like this should help

octave:1> figure(1, "visible", "off");
octave:2> plot(sin(1:100));
octave:3> print -dong "/tmp/sin.png"


fre, 04 01 2008 kl. 08:55 +0000, skrev 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:
>   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
> Thanks in advance,
> Koen.
> _______________________________________________
> Help-octave mailing list
> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]