Credits | Overview | Plotting Styles | Commands | Terminals |
---|
The load command executes each line of the specified input file as if it had been typed in interactively. Files created by the save command can later be loaded. Any text file containing valid gnuplot commands can be executed by a load command. Files being loaded may themselves contain load or call commands. To pass arguments to a loaded file, see call.
Syntax:
load "<input-file>" load $datablock
The name of the input file must be enclosed in quotes.
The special filename "-" may be used to load commands from standard input. This allows a gnuplot command file to accept some commands from standard input. Please see help for batch/interactive for more details.
On systems that support a popen function, the load file can be read from a pipe by starting the file name with a '<'.
Examples:
load 'work.gnu' load "func.dat" load "< loadfile_generator.sh"
The load command is performed implicitly on any file names given as arguments to gnuplot. These are loaded in the order specified, and then gnuplot exits.
EXPERIMENTAL: It is also possible to execute commands from lines of text stored internally. See function blocks. A function block may be defined in-line or in an external file. Once the function block has been defined the commands may be executed repeatedly using evaluate on the internal copy rather than reloading the file.