Credits Overview Plotting Styles Commands Terminals

Function blocks and scoped variables

This version of gnuplot introduces a mechanism for invoking a block of standard gnuplot commands as a callable function. A function block can accept from 0 to 9 parameters and returns a value. Function blocks can be used to calculate and assign a new value to a variable, to combine with other functions and operators, or to perform a repetitive task preparing data. There are three components to this mechanism. See local, scope, function blocks, return.

Please see function_block.dem for an example of using this mechanism to define and plot a non-trivial function that is too complicated for a simple one-line definition f(x) = ....