[Top][All Lists]

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

? Difference between print and __gnuplot_set__ output

From: gOS
Subject: ? Difference between print and __gnuplot_set__ output
Date: Wed, 30 May 2007 10:45:04 -0700 (PDT)

I've been working on trying to save multiple plots to .png files after they
have been plotted. I know this is a subject constantly asked about on the
forums, but I have a question regarding 2 methods that I have found that

Mainly, I have found I can use a function called print or I can use
commandline options.

So my question is, what is the difference if there is any between the
output. One that I have found personally, though I'm not sure why, is that
when another function adds an anotation onto a plot, I find that print saves
this information to the picture whereas __gnuplot_set__ output does not. (I
know there is a __gnuplot_raw__ ("set... etc. ) form of this, but it didn't
change anything and from what I've read it is supposed to do about the same
thing anyway.)  

It seems I'd rather use Option 1 since it is a smaller amount of code. Is
there more control over the picture output by the command line options or is
this just something redundant where one happens to work a bit better than
the other?

Option 1

                          name = [filename '.png'];

Option 2

                eval('__gnuplot_set__ terminal push');

                eval('__gnuplot_set__ nomultiplot');
                cmd=['__gnuplot_set__ terminal png enhanced' optargs]; 

                disp(sprintf('Writing current plot to %s.png',filename));
                cmd=['__gnuplot_set__ output "' filename '.png"'];

                eval('__gnuplot_set__ terminal pop');

View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

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