Debian & Linux
BOINC Combined Statistics
Contact me sending an e-mail (antispam defense activated)
Title: Save a plot to a file
Author: Sandro Tosi
Last modified: 2005-04-26
You've just finished drawing a beautiful graph and you want to include
it into your paper or web page, but how?
Octave, as far as I know, use Gnuplot to draw its graphics; now, if
you want to plot to a file you have to educate Gnuplot to do so.
The commands is the following (suppose your graph is already on the
screen, i.e. you've already used `plot' function):
octave:1> gset term png;
to set the output to a png file
octave:2> gset output "<filename>";
to set the output file
to finally write the already drawn graph to <filename>. Now, every
graph you're going to plot, will be redirected to <filename>; if you
want back the plot window, type:
octave:4> gset term x11;
and the nice window will again pop up.
Note: I recommend you to download octave-forge (Debian package name)
from http://octave.sourceforge.net/ which includes a big number of
interesting and useful tool, some enhancing octave plot ability.
Some more infos can be retrieved on these websites: