help-octave
[Top][All Lists]
Advanced

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

Re: printing a non-visible figure... earlier solutions not working?


From: Ben Abbott
Subject: Re: printing a non-visible figure... earlier solutions not working?
Date: Thu, 15 Mar 2012 14:39:16 -0400

On Mar 15, 2012, at 2:34 PM, Nicholas Jankowski wrote:

> scripting generation of some plot graphics. came across an old mailing
> list discussion that gave the following as an example script to do
> this:
> 
> http://octave.1599824.n4.nabble.com/Saving-pngs-without-plotting-to-screen-first-tp1628966p1628970.html
> 
> octave:1> figure(1, "visible", "off");
> octave:2> plot(sin(1:100));
> octave:3> print -dpng "/tmp/sin.png"
> 
> however, when I follow this exact script, It doesn't generate the
> sin.png file until I execute a figure(1, "visible", "on"), at which
> point it immediately generates the file after redrawing the figure.
> 
> Am I missing something here? Running v3.6.1_gcc4.6.2 (Windows MINGW binary.)

The Windows binary you are using is setup to use the fltk graphics toolkit by 
default.

Currently Octave's print() command only works for the OpenGL toolkits when the 
figure is visible.

If you'd like to print with the figure hidden, try using the Gnuplot toolkit 
instead.

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

Ben



reply via email to

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