W3cubDocs

/Gnuplot

Save

Syntax:
save  {functions | variables | terminal | set | fit} '<filename>'

If no option is specified, gnuplot saves functions, variables, set options and the last plot (splot) command.

saved files are written in text format and may be read by the load command. For save with the set option or without any option, the terminal choice and the output filename are written out as a comment, to get an output file that works in other installations of gnuplot, without changes and without risk of unwillingly overwriting files.

save terminal will write out just the terminal status, without the comment marker in front of it. This is mainly useful for switching the terminal setting for a short while, and getting back to the previously set terminal, afterwards, by loading the saved terminal status. Note that for a single gnuplot session you may rather use the other method of saving and restoring current terminal by the commands set term push and set term pop, see set term.

save fit saves only the variables used in the most recent fit command. The saved file may be used as a parameter file to initialize future fit commands using the via keyword.

The filename must be enclosed in quotes.

The special filename "-" may be used to save commands to standard output. On systems which support a popen function (Unix), the output of save can be piped through an external program by starting the file name with a '|'. This provides a consistent interface to gnuplot's internal settings to programs which communicate with gnuplot through a pipe. Please see help for batch/interactive for more details.

Examples:

save 'work.gnu'
save functions 'func.dat'
save var 'var.dat'
save set 'options.dat'
save term 'myterm.gnu'
save '-'
save '|grep title >t.gp'

Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley
Distributed under the gnuplot license (rights to distribute modified versions are withheld).