help-octave
[Top][All Lists]
Advanced

[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
work.

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'];
                          print(name);

========================================================================
Option 2

                eval('__gnuplot_set__ terminal push');

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

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

                eval('__gnuplot_set__ terminal pop');


======================================================================
-- 
View this message in context: 
http://www.nabble.com/--Difference-between-print-and-__gnuplot_set__-output-tf3841881.html#a10878953
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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