<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2008 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Save</TITLE> <META NAME="description" CONTENT="Save"> <META NAME="keywords" CONTENT="gnuplot"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2008"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="gnuplot.css"> <LINK REL="next" HREF="node175.html"> <LINK REL="previous" HREF="node173.html"> <LINK REL="up" HREF="node88.html"> <LINK REL="next" HREF="node175.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html3571" HREF="node175.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html3565" HREF="node88.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html3559" HREF="node173.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html3567" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html3569" HREF="node467.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html3572" HREF="node175.html">Set-show</A> <B> Up:</B> <A NAME="tex2html3566" HREF="node88.html">Commands</A> <B> Previous:</B> <A NAME="tex2html3560" HREF="node173.html">Reset</A> <B> <A NAME="tex2html3568" HREF="node1.html">Contents</A></B> <B> <A NAME="tex2html3570" HREF="node467.html">Index</A></B> <BR> <BR> <!--End of Navigation Panel--> <H1><A NAME="SECTION040230000000000000000"></A> <A NAME="commands_save"></A><A NAME="save"></A><A NAME="3717"></A> <A NAME="save_set"></A> <BR> Save </H1> The <B>save</B> command saves user-defined functions, variables, the <B>set term</B> status, all <B>set</B> options, or all of these, plus the last <B>plot</B> (<B>splot</B>) command to the specified file. <P> Syntax: <BR> <PRE> save {<option>} '<filename>' </PRE> <BR> <P> where 4#4option5#5 is <B>functions</B>, <B>variables</B>, <B>terminal</B> or <B>set</B>. If no option is used, <B>gnuplot</B> saves functions, variables, <B>set</B> options and the last <B>plot</B> (<B>splot</B>) command. <P> <B>save</B>d files are written in text format and may be read by the <B>load</B> command. For <B>save</B> with the <B>set</B> option or without any option, the <B>terminal</B> choice and the <B>output</B> 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. <P> <B>save terminal</B> will write out just the <B>terminal</B> status, without the comment marker in front of it. This is mainly useful for switching the <B>terminal</B> setting for a short while, and getting back to the previously set terminal, afterwards, by loading the saved <B>terminal</B> status. Note that for a single gnuplot session you may rather use the other method of saving and restoring current terminal by the commands <B>set term push</B> and <B>set term pop</B>, see <B>set term (p. <A HREF="node272.html#set_term"><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]" SRC="crossref.png"></A>)<A NAME="3747"></A></B>. <P> The filename must be enclosed in quotes. <P> The special filename <TT>"</TT>-<TT>"</TT> may be used to <B>save</B> 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 '3#3'. This provides a consistent interface to <B>gnuplot</B>'s internal settings to programs which communicate with <B>gnuplot</B> through a pipe. Please see help for <B>batch/interactive (p. <A HREF="node15.html#batch_interactive"><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]" SRC="crossref.png"></A>)<A NAME="3754"></A></B> for more details. <P> Examples: <BR> <PRE> 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' </PRE> <BR> <HR> <!--Navigation Panel--> <A NAME="tex2html3571" HREF="node175.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html3565" HREF="node88.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html3559" HREF="node173.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html3567" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html3569" HREF="node467.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html3572" HREF="node175.html">Set-show</A> <B> Up:</B> <A NAME="tex2html3566" HREF="node88.html">Commands</A> <B> Previous:</B> <A NAME="tex2html3560" HREF="node173.html">Reset</A> <B> <A NAME="tex2html3568" HREF="node1.html">Contents</A></B> <B> <A NAME="tex2html3570" HREF="node467.html">Index</A></B> <!--End of Navigation Panel--> <ADDRESS> 2010-08-17 </ADDRESS> </BODY> </HTML>