01.02.2014 Views

GNUPlot Manual

GNUPlot Manual

GNUPlot Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

35 SAVE gnuplot 4.0 51<br />

unset key<br />

set yrange [0:10]<br />

set multiplot<br />

call ’plotter’ ’data’<br />

unset multiplot<br />

The result is a single graph consisting of five plots. The yrange must be set explicitly to guarantee that<br />

the five separate graphs (drawn on top of each other in multiplot mode) will have exactly the same axes.<br />

The linetype must be specified; otherwise all the plots would be drawn with the same type. See also<br />

Reread Animation Demo (animate.dem).<br />

34 Reset<br />

The reset command causes all graph-related options that can be set with the set command to take on<br />

their default values. This command is useful, e.g., to restore the default graph settings at the end of a<br />

command file, or to return to a defined state after lots of settings have been changed within a command<br />

file. Please refer to the set command to see the default values that the various options take.<br />

The following set commands do not change the graph status and are thus left unchanged: the terminal<br />

set with set term, the output file set with set output and directory paths set with set loadpath and<br />

set fontpath.<br />

35 Save<br />

The save command saves user-defined functions, variables, the set term status, all set options, or all<br />

of these, plus the last plot (splot) command to the specified file.<br />

Syntax:<br />

save<br />

{} ’’<br />

where is functions, variables, terminal or set. If no option is used, gnuplot saves functions,<br />

variables, set options and the last plot (splot) command.<br />

saved files are written in text format and may be read by the load command. For save with the<br />

set option or without any option, the terminal choice and the output filename are written out as a<br />

comment, to get an output file that works in other installations of gnuplot, without changes and without<br />

risk of unwillingly overwriting files.<br />

save terminal will write out just the terminal status, without the comment marker in front of it. This<br />

is mainly useful for switching the terminal setting for a short while, and getting back to the previously<br />

set terminal, afterwards, by loading the saved terminal status. Note that for a single gnuplot session<br />

you may rather use the other method of saving and restoring current terminal by the commands set<br />

term push and set term pop, see set term (p. 99).<br />

The filename must be enclosed in quotes.<br />

The special filename "-" may be used to save commands to standard output. On systems which support<br />

a popen function (Unix), the output of save can be piped through an external program by starting the<br />

file name with a ’|’. This provides a consistent interface to gnuplot’s internal settings to programs<br />

which communicate with gnuplot through a pipe. Please see "help batch/interactive" for more details.<br />

Examples:<br />

save ’work.gnu’<br />

save functions ’func.dat’<br />

save var ’var.dat’<br />

save set ’options.dat’<br />

save term ’myterm.gnu’<br />

save ’-’<br />

save ’|grep title >t.gp’

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!