Syntax:
save {<option>} '<filename>'
where 5#5option6#6 is functions, variables, terminal or set. If no option is used, 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 (p. ).
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 '4#4'.
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 (p. ) 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'