home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-04-12 | 62.1 KB | 1,702 lines |
- ?
- GNUPLOT is a command-driven interactive function plotting program. It
- is case sensitive (commands and function names written in lowercase
- are not the same as those written in CAPS). All command names may be
- abbreviated, as long as the abbreviation is not ambiguous. Any number
- of commands may appear on a line, separated by semicolons (;).
-
- Any command-line arguments are assumed to be names of files containing
- gnuplot commands, with the exception of standard X11 arguments, which
- are processed first. Each file is loaded with the `load` command, in the
- order specified. Gnuplot exits after the last file is processed.
-
- Commands may extend over several input lines, by ending each line but
- the last with a backslash (\). The backslash must be the LAST
- character on each line. The effect is as if the backslash and newline
- were not there. That is, no white space is implied, nor is a comment
- terminated. Therefore, commenting out a continued line comments out
- the entire command (see `comment`).
-
- In this documentation, curly braces ({}) denote optional arguments to
- many commands.
-
- For help on any topic, type 'help' followed by the name of the topic.
- ?cd
- The `cd` command changes working directory.
-
- Syntax:
- cd <directory-name>
-
- The directory name must be enclosed in quotes.
-
- Examples:
-
- cd 'subdir'
- cd ".."
- ?clear
- The `clear` command erases the current screen or output device as
- specified by `set output`. This usually generates a formfeed on
- hardcopy devices. Use `set terminal` to set the device type.
- ?comments
- Comments are supported as follows: a # may appear in most places in a line
- and GNUPLOT will ignore the rest of the line. It will not have this
- effect inside quotes, inside numbers (including complex numbers), inside
- command substitutions, etc. In short, it works anywhere it makes sense
- to work.
- ?environment
- A number of shell environment variables are understood by GNUPLOT.
- None of these are required, but may be useful.
-
- If GNUTERM is defined, it is used as the name of the terminal type to
- be used. This overrides any terminal type sensed by GNUPLOT on start
- up, but is itself overridden by the .gnuplot (or equivalent) start-up
- file (see help start-up), and of course by later explicit changes.
-
- On Unix and MS-DOS, GNUHELP may be defined to be the pathname of the
- HELP file (gnuplot.gih).
-
- On VMS, the symbol GNUPLOT$HELP should be defined as the name of
- the help library for gnuplot.
-
- On Unix, HOME is used as the name of a directory to search for
- a .gnuplot file if none is found in the current directory.
- On MS-DOS, GNUPLOT is used. On VMS, SYS$LOGIN: is used.
- See help start-up.
-
- On Unix, PAGER is used as an output filter for help messages. SHELL
- is used for the `shell` command.
-
- On MS-DOS, COMSPEC is used for the `shell` command.
- ?exit
- ?quit
- The commands `exit` and `quit` and your computer's END-OF-FILE character
- will exit GNUPLOT. All these commands will clear the output device
- (as the `clear` command does) before exiting.
- ?expressions
- In general, any mathematical expression accepted by C, FORTRAN,
- Pascal, or BASIC is valid. The precedence of these operators is
- determined by the specifications of the C programming language.
- White space (spaces and tabs) is ignored inside expressions.
-
- Complex constants may be expressed as the {<real>,<imag>}, where <real>
- and <imag> must be numerical constants. For example {3,2}
- represents 3 + 2i; {0,1} represents `i` itself. The curly braces
- are explicitly required here.
- ?expressions functions
- ?functions
- The functions in GNUPLOT are the same as the corresponding functions
- in the UNIX math library, except that all functions accept integer,
- real, and complex arguments, unless otherwise noted. The `sgn`
- function is also supported, as in BASIC.
- ?expressions functions abs
- ?functions abs
- ?abs
- The `abs` function returns the absolute value of its argument. The
- returned value is of the same type as the argument.
-
- For complex arguments, abs(x) is defined as the length of x in the
- complex plane [i.e., sqrt(real(x)**2 + imag(x)**2) ].
- ?expressions functions acos
- ?functions acos
- ?acos
- The `acos` function returns the arc cosine (inverse cosine) of its
- argument. `acos` returns its argument in radians.
- ?expressions functions arg
- ?functions arg
- ?arg
- The `arg` function returns the phase of a complex number, in radians.
- ?expressions functions asin
- ?functions asin
- ?asin
- The `asin` function returns the arc sin (inverse sin) of its argument.
- `asin` returns its argument in radians.
- ?expressions functions atan
- ?functions atan
- ?atan
- The `atan` function returns the arc tangent (inverse tangent) of its
- argument. `atan` returns its argument in radians.
- ?expressions functions besj0
- ?functions besj0
- ?besj0
- The `besj0` function returns the j0th Bessel function of its argument.
- `besj0` expects its argument to be in radians.
- ?expressions functions besj1
- ?functions besj1
- ?besj1
- The `besj1` function returns the j1st Bessel function of its argument.
- `besj1` expects its argument to be in radians.
- ?expressions functions besy0
- ?functions besy0
- ?besy0
- The `besy0` function returns the y0th Bessel function of its argument.
- `besy0` expects its argument to be in radians.
- ?expressions functions besy1
- ?functions besy1
- ?besy1
- The `besy1` function returns the y1st Bessel function of its argument.
- `besy1` expects its argument to be in radians.
- ?expressions functions ceil
- ?functions ceil
- ?ceil
- The `ceil` function returns the smallest integer that is not less than its
- argument. For complex numbers, `ceil` returns the smallest integer
- not less than the real part of its argument.
- ?expressions functions cos
- ?functions cos
- ?cos
- The `cos` function returns the cosine of its argument. `cos` expects its
- argument to be in radians.
- ?expressions functions cosh
- ?functions cosh
- ?cosh
- The `cosh` function returns the hyperbolic cosine of its argument.
- `cosh` expects its argument to be in radians.
- ?expressions functions exp
- ?functions exp
- ?exp
- The `exp` function returns the exponential function of its argument
- (`e` raised to the power of its argument).
- ?expressions functions floor
- ?functions floor
- ?floor
- The `floor` function returns the largest integer not greater than its
- argument. For complex numbers, `floor` returns the largest
- integer not greater than the real part of its argument.
- ?expressions functions imag
- ?functions imag
- ?imag
- The `imag` function returns the imaginary part of its argument as a
- real number.
- ?expressions functions int
- ?functions int
- ?int
- The `int` function returns the integer part of its argument, truncated
- toward zero.
- ?expressions functions log
- ?functions log
- ?log
- The `log` function returns the natural logarithm (base `e`) of its
- argument.
- ?expressions functions log10
- ?functions log10
- ?log10
- The `log10` function returns the logarithm (base 10) of its argument.
- ?expressions functions real
- ?functions real
- ?real
- The `real` function returns the real part of its argument.
- ?expressions functions sgn
- ?functions sgn
- ?sgn
- The `sgn` function returns 1 if its argument is positive, -1 if its
- argument is negative, and 0 if its argument is 0. If the argument
- is a complex value, the imaginary component is ignored.
- ?expressions functions sin
- ?functions sin
- ?sin
- The `sin` function returns the sine of its argument. `sin` expects its
- argument to be in radians.
- ?expressions functions sinh
- ?functions sinh
- ?sinh
- The `sinh` function returns the hyperbolic sine of its argument. `sinh`
- expects its argument to be in radians.
- ?expressions functions sqrt
- ?functions sqrt
- ?sqrt
- The `sqrt` function returns the square root of its argument.
- ?expressions functions tan
- ?functions tan
- ?tan
- The `tan` function returns the tangent of its argument. `tan` expects
- its argument to be in radians.
- ?expressions functions tanh
- ?functions tanh
- ?tanh
- The `tanh` function returns the hyperbolic tangent of its argument.
- `tanh` expects its argument to be in radians.
- ?expressions operators
- ?operators
- The operators in GNUPLOT are the same as the corresponding operators
- in the C programming language, except that all operators accept
- integer, real, and complex arguments, unless otherwise noted.
- The ** operator (exponentiation) is supported, as in FORTRAN.
-
- Parentheses may be used to change order of evaluation.
- ?expressions operators binary
- ?operators binary
- ?binary
- The following is a list of all the binary operators and their
- usages:
-
- Symbol Example Explanation
- ** a**b exponentiation
- * a*b multiplication
- / a/b division
- % a%b * modulo
- + a+b addition
- - a-b subtraction
- == a==b equality
- != a!=b inequality
- & a&b * bitwise AND
- ^ a^b * bitwise exclusive OR
- | a|b * bitwise inclusive OR
- && a&&b * logical AND
- || a||b * logical OR
- ?: a?b:c * ternary operation
-
- (*) Starred explanations indicate that the operator requires
- integer arguments.
-
- Logical AND (&&) and OR (||) short-circuit the way they do in C.
- That is, the second && operand is not evaluated if the first is
- false; the second || operand is not evaluated if the first is true.
-
- The ternary operator evaluates its first argument (a). If it is
- true (non-zero) the second argument (b) is evaluated and returned,
- otherwise the third argument (c) is evaluated and returned.
- ?expressions operators unary
- ?operators unary
- ?unary
- The following is a list of all the unary operators and their
- usages:
-
- Symbol Example Explanation
- - -a unary minus
- ~ ~a * one's complement
- ! !a * logical negation
- ! a! * factorial
-
- (*) Starred explanations indicate that the operator requires an
- integer argument.
-
- The factorial operator returns a real number to allow a greater range.
- ?help
- The `help` command displays on-line help. To specify information on a
- particular topic use the syntax:
-
- help <topic>
-
- If <topic> is not specified, a short message is printed about
- GNUPLOT. After help for the requested topic is given, help for
- a subtopic may be requested by typing its name, extending the help
- request. After that subtopic has been printed, you may extend the
- request again, as before, or go back one level to the previous topic,
- by simply pressing return without typing anything. Eventually, you
- will return to the GNUPLOT command line.
- ?load
- 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 `load`ed. Any text file containing valid
- commands can be created and then executed by the `load` command.
- Files being `load`ed may themselves contain `load` commands. See
- `comment` for information about comments in commands.
-
- The `load` command must be the last command on the line.
-
- Syntax:
- load <input-file>
-
- The name of the input file must be enclosed in quotes.
-
- Examples:
-
- load 'work.gnu'
- load "func.dat"
-
- 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.
- ?pause
- Pause is useful in conjunction with `load` files. The command `pause`
- displays any text associated with the command and then waits the
- specified amount of time. This allows one to build a `load` file
- and control the amount of time a finished graph is displayed. The
- first argument is an expression that can be -1, 0, or a positive
- integer. Choosing -1 will wait until a carriage return is hit. Zero (0)
- won't pause at all, and a positive integer (such as 1 or 15) will
- wait the specified number of seconds.
-
- Note: Since pause is not part of the plot it may interact with
- different device drivers differently (depending upon how text and
- graphics are mixed).
-
- Examples:
- pause -1 ! Wait until a carriage return is hit
- pause 3 ! Wait three seconds
- pause -1 "Hit return to continue"
- pause 10 "Isn't this pretty? It's a cubic-spline."
-
- Syntax:
- pause <expression> {"string"}
- Note the string is optional, and if present must be enclosed in quotes.
- ?plot
- ?splot
- `plot` and `splot` are the primary commands of the program. They plot
- functions and data in many, many ways. `plot` is used to plot 2-d curves
- and data, while `splot` plots 3-d surfaces and data. The full syntax of
- these commands are:
-
- plot {ranges} <function> {title} {style} {, <function> {title} {style}...}
-
- and
-
- splot {ranges} <function> {title} {style} {, <function> {title} {style}...}
-
- Where <function> is either a mathematical expression, the name of a
- data file enclosed in quotes, or a pair (plot) or triple (splot) of
- mathematical expressions in the case of parametric functions.
- User-defined functions and variables may also be defined here.
-
- Curly braces {,} denote optional items.
-
- `plot` and `splot` commands can be as simple as
-
- plot sin(x)
-
- and
-
- splot x * y
-
- or as complex as (!)
-
- plot [t=1:10] [-pi:pi*2] tan(t),"data.1" with lines,t**2 with points
- ?plot datafile
- ?plot data-file
- ?splot datafile
- ?splot data-file
- ?datafile
- ?data-file
- ?data
- Discrete data contained in a file can displayed by specifying the
- name of the data file (enclosed in quotes) on the `plot` command
- line.
-
- Data files should contain one data point per line. A data point may
- be specified either as an X and Y (and Z for splot) value separated by
- blank space, or as just the Y (Z for splot) value, in which case the
- program will use the number of the coordinate as the X (and Y for splot)
- value. Coordinate numbers start at 0 and are incremented for each data
- point read. To specify other formats, see `plot datafile using`. Lines
- beginning with # (or ! on VMS) will be treated as comments and ignored.
-
- NOTE that blank lines cause a break in the input in plot command but not
- for splot command in which blank lines are ignored. If the plot
- style is `lines` or `linespoints` (see `plot style`) there will be no
- line drawn between the preceding and following points. This does not
- change the plot style, as would plotting the data as separate curves.
-
- This example compares the data in the file population.dat to a
- theoretical curve:
-
- pop(x) = 103*exp((1965-x)/10)
- plot [1960:1990] 'population.dat', pop(x)
-
- or
-
- splot 'glass.dat'
-
- The file population.dat might contain:
-
- # Gnu population in Antarctica since 1965
- 1965 103
- 1970 55
- 1975 34
- 1980 24
- 1985 10
-
- When data file is plotted, samples must be bigger than the data size.
- However when it is splotted (3-d) samples should be exactly equal to the
- first dimension of the data grid while isosamples to the second dimension
- and the total number of points must be therefore samples * isosamples.
- See also `set samples` and `set isosamples`.
- ?plot datafile using
- ?plot data-file using
- ?splot datafile using
- ?splot data-file using
- ?using
- The format of data within a file can be selected with the `using`
- option. The `xy` and `yx` specify the order of the `x` and `y`
- variables in the data file in the plot command. To reverse the variables
- specify `yx`. splot command allows only the `xyz` order. To specify that
- the datafile should contain one variable specify `y` (or `z` for splot).
-
- Syntax:
-
- plot "datafile" { using { xy | yx | y } {"scanf string"} } ...
-
- and
-
- splot "datafile" { using { xyz | z } {"scanf string"} } ...
-
- If the `xy`, `yx` or `y` option is omitted, `xy` is used for plot.
- Similarly `xyz` will be used for splot. If the scanf string is omitted,
- the default of `"%f%f"` is used for plot and `"%f %f %f"` for splot.
-
- Examples:
-
- plot "MyData" using yx "%*f%f%*20[^\n]%f" with lines
- This causes data to be read from the file "MyData" using the format
- `yx "%*f%f%*20[^\n]%f"`. The meaning of this format is: `%*f`
- ignore the first number, `%f` then read in the second and assign to y
- (the `yx` option of using), `%*20[^\n]` then ignore 20 non-newline
- characters, `%f` then read in the x value.
-
- plot "MyData" using "%f%f", "MyData" using "%f%*f%f"
- Causes gnuplot to plot the second and third columns of MyData versus
- the first column.
-
- splot "glass.dat" using z "%f"
- Causes gnuplot to splot the first coordinate of the points of glass.dat
- as the z splot component while ignoring the other two coordinates.
-
- Note: gnuplot first reads a line of the data file into a buffer and
- then does a
- sscanf(input_buffer, scanf_string, &x, &y{, &z});
- where `x`, `y` and `z` are of type `float`. Any scanf string that
- specifies two (three for splot) `float` numbers may be used.
- ?plot parametric
- ?splot parametric
- ?parametric
- When in parametric mode (`set parametric`) mathematical expressions must
- be given in pairs for plot and in triplets for splot:
- plot sin(t),t**2
-
- or
-
- splot cos(u)*cos(v),cos(u)*sin(v),sin(u)
-
- Data files are plotted as before, except the parametric function
- must be fully specified before a data file is given as a plot. In
- other words, the x parametric function (sin(t) above) and the y
- parametric function (t**2 above) must not be interrupted with any
- modifiers or data functions; doing so will generate a syntax error
- stating that the parametric function is not fully specified.
-
- Ranges take on a different meaning when in parametric mode. The
- first specifiable range on the plot command is the trange, the
- next the xrange, and the last is the yrange. For splot the order is
- urange, vrange, xrange, yrange and finally zrange. The following plot
- shows setting the trange to [-pi:pi], the xrange to [-1.3:1.3]
- and the yrange to [-1:1] for the duration of the plot:
- plot [-pi:pi] [-1.3:1.3] [-1:1] sin(t),t**2
-
- Other modifiers, such as `with` and `title` are required after
- the function has been fully specified:
- plot sin(t),t**2 with linespoints title 'Parametric example'
- ?splot ranges
- ?plot ranges
- ?ranges
- The optional range specifies the region of the plot which will be displayed.
-
- Ranges may be provided on the `plot` and `splot` command line and
- affect only that plot, or in the `set xrange`, `set yrange` etc.
- commands, to change the default ranges for future plots.
-
- Syntax:
- [{dummy-var =} {xmin : xmax}] { [{ymin : ymax}] }
-
- Where dummy-var is the independent variable (the defaults are `x` and `y`,
- but this may be changed with the `set dummy`) and the min and max terms
- can be expressions or constants.
-
- Both the min and max terms are optional. The ':' is also optional
- if neither a min nor a max term is specified. This allows '[]' to
- be used as a null range specification.
-
- Specifying a range in the `plot` command line turns autoscaling for
- that axis OFF for that plot. Using one of the `set` range commands
- turns autoscaling off for that axis for future plots, unless changed
- later. (See `set autoscale`).
-
-
- Examples:
-
- This uses current ranges:
- plot cos(x)
-
- This sets the xrange only:
- plot [-10:30] sin(pi*x)/(pi*x)
-
- This is the same, but uses t as the dummy-variable:
- plot [t = -10 :30] sin(pi*t)/(pi*t)
-
- This sets both the x and yranges:
- plot [-pi:pi] [-3:3] tan(x), 1/x
-
- This sets only the yrange:
- plot [] [-2:sin(5)*-8] sin(x)**besj0(x)
-
- This sets xmax and ymin only:
- plot [:200] [-pi:] exp(sin(x))
-
- This sets the x, y, and z ranges:
- splot [0:3] [1:4] [-1:1] x*y
- ?plot style
- ?splot style
- ?style
- Plots may be displayed in one of four styles: `lines`, `points`,
- `linespoints`, `impulses`, or `dots`. The `lines` style connects
- adjacent points with lines. The `points` style displays a small
- symbol at each point. The `linespoints` style does both `lines` and
- `points`. The `impulses` style displays a vertical line from the X
- axis (or from the grid base for splot) to each point. The `dots` style
- plots a tiny dot at each point;
- this is useful for scatter plots with many points.
-
- Default styles are chosen with the `set function style` and
- `set data style` commands.
-
- By default, each function and data file will use a different
- line type and point type, up to the maximum number of available
- types. All terminal drivers support at least six different point
- types, and re-use them, in order, if more than six are required.
- The LaTeX driver supplies an additional six point types (all variants
- of a circle), and thus will only repeat after twelve curves are
- plotted with points.
-
- If desired, the actual line type and point type used for a plot can
- be specified. Syntax:
-
- with <style> {<linetype> {<pointtype>}}
-
- Where <style> is either `lines`, `points`, `linespoints`, `impulses`,
- or `dots`. These keywords may be abbreviated.
- Curly braces denote optional items. The <linetype> and <pointtype>
- are positive integers, and specify the line type and point type to
- be used for the plot. Line type 1 is the first line type used by
- default, line type 2 is the second line type used by default etc.
-
- Examples:
-
- This plots sin(x) with impulses:
- plot sin(x) with impulses
-
- This plots x*y with points, x**2 + y**2 default:
- splot x*y w points, x**2 + y**2
-
- This plots tan(x) with the default function style, "data.1" with lines:
- plot [] [-2:5] tan(x), "data.1" with l
-
- This plots "leastsq.dat" with impulses:
- plot 'leastsq.dat' w i
-
- This plots x**2 + y**2 and x**2 - y**2 with the same line type:
- splot x**2 + y**2 with line 1, x**2 - y**2 with line 1
-
- This plots sin(x) and cos(x) with linespoints, using the
- same line type but different point types:
- plot sin(x) with linesp 1 3, cos(x) with linesp 1 4
-
- This plots file "data" with points style 3:
- plot "data" with points 1 3
- Note that the line style must be specified in order to specify the
- point style, even when it is irrelevant. Here the line style is 1 and
- the point style is 3, and the line style is irrelevant.
- ?plot title
- ?splot title
- A title of each plot appears in the key. By default the title is
- the function or file name as it appears on the plot command line.
- The title can be changed by using the `title` option. This option
- should precede any `with` option.
-
- Syntax:
- title <title>
-
- Where <title> is the new title of the plot and must be enclosed in
- quotes.
-
- Examples:
-
- This plots y=x with the title 'x':
- plot x
-
- This plots z=x*y with the title 'x*y':
- splot x*y title 'x*y'
-
- This plots x squared with title 'x^2' and "data.1" with title 'measured data':
- plot x**2 title "x^2", "data.1" t 'measured data'
- ?print
- The `print` command prints the value of <expression> to the screen.
-
- Syntax:
- print <expression>
-
- See `expressions`.
- ?pwd
- The `pwd` command prints the name of the working directory to the screen.
-
- Syntax:
- pwd
- ?quit
- The `exit` and `quit` commands and your computer's END-OF-FILE
- character will exit GNUPLOT. All these commands will clear the
- output device (as the `clear` command does) before exiting.
- ?replot
- The `replot` command without arguments repeats the last `plot` or `splot`
- command. This can be useful for viewing a plot with different `set`
- options, or when generating the same plot for several devices.
-
- Arguments specified after a `replot` command will be added onto the last
- `plot` (`splot`) command (with an implied ',' separator) before it is
- repeated. `replot` accepts the same arguments as the `plot` or `splot`
- commands except that ranges cannot be specified.
- ?save
- The `save` command saves user-defined functions, variables, set
- options or all three plus the last plot command to the specified file.
-
- Syntax:
- save {<option>} <filename>
-
- Where <option> is `functions`, `variables` or `set`. If no option is
- used GNUPLOT saves functions, variables, set options and the last plot
- command.
-
- `save`d files are written in text format and may be read by the `load`
- command.
-
- The filename must be enclosed in quotes.
-
- Examples:
-
- save "work.gnu"
- save functions 'func.dat'
- save var 'var.dat'
- save set "options.dat"
- ?set
- ?show
- The `set` command sets LOTS of options.
-
- The `show` command shows their settings. `show all` shows all the
- settings.
- ?set arrow
- ?set noarrow
- ?show arrow
- ?arrow
- ?noarrow
- Arbitrary arrows can be placed on the plot using the `set arrow`
- command.
-
- Syntax:
-
- set arrow {tag} {from sx,sy{,sz}} {to ex,ey{,ez}}
- set noarrow {tag}
- show arrow
-
-
- Curly braces {} denote optional items.
- All positions x,y,z default to 0,0,0.
- The x y and z values are in the graph's coordinate system. The z is
- ignored for plot commands and is used in splot plots only.
- The tag is an integer that is used to identify the arrow.
- If no tag is given, the lowest unused tag value is assigned
- automatically. The tag can be used to delete or change a specific
- arrow. To change any attribute of an existing arrow, use the `set
- arrow` command with the appropriate tag, and specify the parts of the
- arrow to be changed.
-
- Arrows outside the plotted boundaries are permitted but may cause
- device errors; use at your own risk.
-
- Examples:
-
- To set an arrow pointing from the origin to (1,2) use
- set arrow to 1,2
- To set an arrow from (-10,4,2) to (-5,5,3), and tag the arrow number 3, use:
- set arrow 3 from -10,4,2 to -5,5,3
- To change the preceding arrow begin at 1,1,1, use
- set arrow 3 from 1,1,1
- To delete arrow number 2 use:
- set noarrow 2
- To delete all arrows use:
- set noarrow
- To show all arrows (in tag order) use:
- show arrow
- ?set autoscale
- ?show autoscale
- ?autoscale
- Auto scaling may be set individually on the X, Y and/or Z axis or globally
- on all axes. The default is to autoscale all axes.
-
- When autoscaling, the plot range is automatically computed and the
- dependent axis (Y for a plot and Z for a 3-d splot) is scaled to include
- the range of the function or data being plotted.
-
- If autoscaling of the dependent axis (Y or Z) is not set, the current
- Y or Z range is used.
-
- See `set yrange`, or `set zrange`.
-
- Autoscaling the independent variables (`x` for a plot and `x,y` for a
- 3-d surface plot) is taken to mean set the domain to match any data file
- being plotted. If there are no data files then autoscaling an independent
- variable has no effect (is ignored). In other words, in the absence
- of a data file, functions alone do not affect the x range (or the y range
- if plotting z = f(x,y)).
-
- See `set xrange`, or `set yrange`.
-
- The behavior of autoscaling remains consistent in parametric mode, however,
- there are more dependent variables and hence more control over X, Y, and
- Z plot scales. In parametric mode, the independent or dummy variable is
- `t` for planar plots and `u,v` for surface plots (3-d splots). Autoscale
- in parametric mode, then, controls all ranges (t,v,y,x,y, and z) and
- allows x, y, and z (for 3-d splots) to be fully autoscaled.
-
- See `set parametric`.
-
- Syntax:
- set autoscale <axes>
- set noautoscale <axes>
- show autoscale
-
- where <axes> is either `x`, `y`, `z` or `xy`.
- If <axes> is not given then all axes are assumed.
-
- Examples:
-
- These set autoscaling of the Y axis. X axis autoscaling not affected.
- set autoscale y
-
- This sets autoscaling of the X and Y axes.
- set autoscale xy
-
- This sets autoscaling of the X, Y and Z axes.
- set autoscale
-
- This disables autoscaling of the X, Y and Z axes.
- set noautoscale
-
- This disables autoscaling of the Z axis only.
- set noautoscale z
- ?autoscale parametric
- ?set autoscale t
- When in parametric mode (`set parametric`) the xrange is as
- fully scalable as the yrange. In other words, in parametric
- mode the X axis can be automatically scaled to fit the range
- of the parametric function that is being plotted. Of course,
- the Y axis can also be automatically scaled just as in the
- non-parametric case. If autoscaling on the X axis is not set,
- the current X range is used.
-
- When there is a mix of data files and functions, the xrange of
- the functions is selected as that of the data files if autoscale
- is true for X. While this keeps the behavior compatible with
- non-parametric plotting, it may not be retained in the future.
- The problem is that, in parametric mode, the x and y ranges are
- not as distinguishable as in the non-parametric mode and this
- behavior may not be the most useful.
-
- For completeness sake a last command `set autoscale t` is accepted.
- However, the effect of this "scaling" is very minor. When
- gnuplot determines that the t range would be empty it makes a
- small adjustment if autoscaling is true. Otherwise, gnuplot
- gives an error. Such behavior may, in fact, not be very useful
- and the command `set autoscale t` is certainly questionable.
-
- The 3-d case (a surface plot) extends the above idea similarly. If
- autoscaling is set then X, Y, and Z ranges are computed and each axis
- scaled to fit the resulting data.
- ?set border
- ?set noborder
- ?show border
- ?border
- ?noborder
- The 'set border' and 'set noborder' commands controls the display of
- the plot borders for the 2-d plot and 3-d splot commands.
-
- Syntax:
- set border
- set noborder
- show border
- ?set clip
- ?set noclip
- ?show clip
- ?clip
- ?noclip
- GNUPLOT can clip (actually, not plot at all) data points that fall
- within but too close to the boundaries (this is so the large symbols
- used for points will not extend outside the boundary lines). To turn
- on clipping, use `set clip points`. To turn it back off, use `set
- noclip points`. The default is `noclip`. Without clipping you may have
- points near the boundaries that look bad; try adjusting the x and y ranges.
-
- Syntax:
- set clip points
- set noclip points
-
- GNUPLOT can also clip lines that connect a point that is in range
- with a point that is out of range. The default is to draw the
- in-range portion of such lines (i.e., to "clip" them). With the
- following syntax, the default is `set clip one`. The alternative
- (`set noclip one`) is to not draw any portion of the line segment. In
- no case is a line drawn outside the plotting area.
-
- Syntax:
- set clip one
- set noclip one
-
- GNUPLOT does not show lines that are wholly out of range. Some lines
- may have both endpoints out of range, but pass through the plotting
- area. By default, GNUPLOT does not draw these lines (`set noclip
- two`). They may be drawn (and clipped) with `set clip two`.
-
- Syntax:
- set clip two
- set noclip two
-
- To check the state of all forms of clipping, use
- show clip
-
- The following forms are also permitted. These allow backward
- compatibility with older versions.
- set clip
- set noclip
- `set clip` is synonymous with `set clip points`. `set noclip` turns
- off all three types of clipping (`points`, `one`, and `two`).
- ?set cntrparam
- ?show cntrparam
- ?cntrparam
- Sets the different parameters for the contouring plot (see also contour).
-
- Syntax:
- set cntrparam { kind { linear | cubicspline | bspline } |
- points n |
- levels n |
- order n }
-
- This command controls the way contours are plotted. The parameters are:
- kind - Controls type of approximation or interpolation. If linear then
- the contours are drawn as piecewise linear as extracted from the
- surface directly. if cubicspline then piecewise linear contours
- are interpolated to form a somewhat smoother contours, but which
- may undulate. The third option is uniform bspline which only
- approximates the piecewise linear data but is guarantee to be
- smoother.
- points - Eventually all drawings are done with piecewise linear strokes.
- This number controls by how many points a curve will be
- approximated. Relevant for cubicspl and bspline modes only
- levels - Number of contour levels. If the surface is bounded by zmin
- and zmax then contours will be generated from zmin+dz to zmax-dz
- in dz steps, where dz = (zmax - zmin) / (levels + 1)
- order - Order of the bspline approximation to be used. The bigger this
- order is, more smooth the resulting contour is, while less
- following the original piecewise linear data. This option is
- relevant for bspline mode only.
- ?set contour
- ?show contour
- ?contour
- Enable contour drawing for surfaces. This option is available for splot
- plots only.
-
- Syntax:
- set contour { base | surface | both }
- set nocontour
-
- Issuing 'set contour' will default to base. The three options specifies
- where to draw the contours:
- base - draw the contours on the grid base where the x/ytics are placed.
- surface - draw the contours on the surfaces themselves.
- both - draw the contours on both the above.
-
- See also `set cntrparam` for the parameters in which the contours are drawn.
- ?set dummy
- ?show dummy
- ?dummy
- By default, GNUPLOT assumes that the independent variables for the `plot`
- and `splot` commands are `x` and `y`. They are called the dummy variables
- because it is just a notation to indicate the independent variables. The
- `set dummy` command changes this default dummy variable names. For
- example, you may find it more convenient to call the dummy variable
- `t` when plotting time functions:
-
- set dummy t
- plot sin(t), cos(t)
-
- Syntax:
- set dummy <dummy-var>{,<dummy-var>}
- show dummy
-
- Examples:
- set dummy u,v
- set dummy ,s
-
- to set both dummy variables to u and v or set only the second variable to s.
- ?set format
- ?show format
- ?format
- The format of the tic-mark labels can be set with the `set format`
- command. The default format for both axes is "%g", but other formats
- such as "%.2f" or "%3.0fm" are often desirable. Anything accepted by
- printf when given a double precision number, and then accepted by the
- terminal, will work. In particular, the formats f, e, and g will work,
- and the d, o, x, c, s, and u formats will not work.
-
- Syntax:
- set format {<axes>} {"format-string"}
- show format
-
- where <axes> is either `x`, `y`, `xy`, or nothing (which is the same
- as `xy`). The length of the string representing a ticmark (after
- formatting with printf) is restricted to 100 characters.
- If the format string is omitted, the format will be returned to
- the default "%g". For LaTeX users, the format "$%g$" is often desirable.
- If the empty string "" is used, no label will be plotted with each
- tic, though the tic mark will still be plotted. To eliminate all tic
- marks, use `set noxtics` or `set noytics`.
-
- See also `set xtics` and `set ytics` for more control over tic labels.
- ?show functions
- The `show functions` command lists all user-defined functions and
- their definitions.
-
- Syntax:
- show functions
- ?set grid
- ?show grid
- ?grid
- The optional `set grid` draws a grid at the tic marks with the axis
- linetype.
-
- Syntax:
- set grid
- set nogrid
- show grid
- ?set isosamples
- ?show isosamples
- ?isosamples
- The isolines density of surfaces may be changed by the `set isosamples`
- command. By default, sampling is set to 10 isolines per axis. A higher
- sampling rate will produce more accurate plots, but will take
- longer. When plotting datafiles, the isoline sampling rate must be set
- to be equal to the second dimension of the grid data points.
-
- Syntax:
- set isosamples <expression>
- show isosamples
- ?set key
- ?show key
- ?key
- The `set key` enables a key describing curves on a plot.
- By default the key is placed in the upper right corner of
- the plot.
-
- Syntax:
- set key
- set key x,y
- set nokey
- show key
-
- The coordinates x,y specify the location of the key on the plot.
- The key is drawn as a sequence of lines, with one plot described
- on each line. On the right hand side of each line is a
- representation that attempts to mimic the way the curve is plotted.
- On the left side of each line is the text description,
- obtained from the `plot` command. The lines are vertically
- arranged so an imaginary straight line divides the left- and
- right-hand sides of the key. It is the x-coordinate of this
- line that you specify with the optional x in the `set key`
- command; the y in the `set key` command is top of the key.
- Some or all of the key may be outside of the plot boundary, if you
- wish, although this may interfere with other labels and may cause an
- error on some devices.
-
- Examples:
-
- This places the key at the default location:
- set key
- This disables the key.
- set nokey
- This places a key at coordinates 2,3.5
- set key 2,3.5
- ?set label
- ?set nolabel
- ?show label
- ?label
- ?nolabel
- Arbitrary labels can be placed on the plot using the `set label` command.
- Set label can be used on either a 3-d surface plot or a normal 2-d plot.
- If the `z` coordinate is given on a 2-d plot it is ignored; if it is
- missing on a 3-d surface plot it is assumed to be 0.
-
- Syntax:
-
- set label {tag} {"label_text"} {at x,y{,z}} {<justification>}
- set nolabel {tag}
- show label
-
-
- Curly braces {} denote optional items.
- The text defaults to "", and the position x,y,z to 0,0,0.
- The x, y and z values are in the graph's coordinate system (z is ignored
- for 2-d plots). The tag is an integer that is used to identify the
- label. If no tag is given, the lowest unused tag value is assigned
- automatically. The tag can be used to delete or change a specific
- label. To change any attribute of an existing label, use the `set
- label` command with the appropriate tag, and specify the parts of the
- label to be changed.
-
- By default, the text is placed flush left against point x,y. If you
- want to adjust the way the label is positioned with respect to the
- point x,y, add the parameter <justification>, which may be `left`,
- `right` or `center`, indicating that the point is to be at the left,
- right or center of the text. The <justification> may be abbreviated.
- Labels outside the plotted boundaries are permitted but may interfere
- with axes labels or other text; use at your own risk.
-
- Examples:
-
- To set a label at (1,2) to "y=x" use:
- set label "y=x" at 1,2
- To set a label "y=x^2" with the right of the text at (2,3,4), and tag
- the label number 3, use:
- set label 3 "y=x^2" at 2,3,4 right
- To change the preceding label to center justification, use:
- set label 3 center
- To delete label number 2 use:
- set nolabel 2
- To delete all labels use:
- set nolabel
- To show all labels (in tag order) use:
- show label
-
- The Imagen driver allows \\ in a string to specify a newline.
- ?set logscale
- ?set nologscale
- ?show logscale
- ?logscale
- ?nologscale
- Log scaling may be set on the X, Y and/or Z axis.
-
- Syntax:
- set logscale <axes>
- set nologscale <axes>
- show logscale
-
- Where <axes> is either `x`, `y`, `z` or `xy`.
- If <axes> is not given then both axes are assumed.
- The command `set logscale` turns on log scaling on the specified
- axes, while `set nologscale` turns off log scaling.
- ?set offsets
- ?show offsets
- ?offsets
- The amount of the graph that the plot takes up may be controlled
- to some extent with the `set offsets` command. This command takes
- four offset arguments -- <left>, <right>, <top> and <bottom>.
- By default, each offset is 0. Each offest may be a constant or
- an expression. Left and right offsets are given in units of
- the x axis, while top and bottom offsets are given in units of
- the y axis. The plot of sin(x), displayed with offsets of
- 0, 0, 2, 2 will take up 1/3 of the displayed y axis.
- Offsets are particularly useful with polar coordinates as a means
- of compensating for aspect ratio distortion.
-
- Syntax:
- set offsets <left>, <right>, <top>, <bottom>
- show offsets
- ?set output
- ?show output
- ?output
- By default, plots are displayed to the standard output. The
- `set output` command redirects the display to the specified file or
- device.
-
- Syntax:
- set output {<filename>}
- show output
-
- The filename must be enclosed in quotes. If the filename is
- omitted, output will be sent to the standard output.
- ?set parametric
- ?show parametric
- ?parametric
- The `set parametric` command changes the meaning of the plot from
- normal functions to parametric functions. The command
- `set noparametric` changes the plotting style back to normal,
- single-valued expression plotting.
-
- In 2-d plotting, a parametric function is determined by a pair
- of parametric functions operating on a `parameter`. An example
- of a 2-d parametric function would be
-
- For 3-d plotting, the surface is described as x=f(u,v), y=g(u,v),
- z=h(u,v) and hence a triplet of functions are required. An example
- of 3-d parametric function would be
- cos(u)*cos(v),cos(u)*sin(v),sin(u) (which defines a sphere).
- Hence it takes two or three parametric function specifications in
- terms of the parametric dummy argument to describe a single graph.
-
- The total set of possible plots is a superset of the simple f(x)
- style plots, since the two (three) functions can describe both the
- x and y (and z) values to be computed separately. In fact, plots of
- the type t,f(t) (u,v,f(u,v)) are equivalent to those produced with
- f(x) when the x values are computed using identity function as the
- first function.
-
- Note that the order the parametric function is specified is xfunction,
- yfunction (and zfunction) and that each operates over the common
- parametric domain.
-
- Also, the `set parametric` function implies a new range of values.
- Whereas the normal f(x) and f(x,y) style plotting assume an xrange
- yrange (and zrange), the parametric mode additionally specifies a trange
- urange and vrange. These ranges may be specified specified directly with
- `set trange`, `set urange` and `set vrange` or by specifying the range on
- the plot and/or splot commands. Currently the default range for these
- parametric variables is [-5:5]. It is expected you'll want to set them
- to something more meaningful.
- ?set polar
- ?show polar
- ?polar
- The `set polar` command changes the meaning of the plot from
- rectangular coordinates to polar coordinates. In polar
- coordinates, the dummy variable (x) is an angle. The range
- of this angle is changed from whatever it was to [0:2*pi].
-
- The command `set nopolar` changes the meaning of the plot back
- to the default rectangular coordinate system. The range of
- x is changed from whatever it was to [-10:10].
-
- While in polar coordinates the meaning of an expression in x
- is really r = f(x), where x is an angle of rotation. The xrange
- controls the domain (the angle) of the function, and the yrange
- controls the range (the radius). The plot is plotted on a rectangular
- grid, and the `x` and `y` axes are both in units of the radius. Thus,
- the yrange controls both dimensions of the plot output. There is no
- way to specify the output dimensions separately.
-
- Syntax:
- set polar
- set nopolar
- show polar
- Example:
- set polar
- plot x*sin(x)
- plot [-2*pi:2*pi] [-3:3] x*sin(x)
- The first plot uses the default polar angular domain of 0 to 2*pi.
- The radius (and the size of the plot) is scaled automatically. The
- second plot expands the domain, and restricts the range of the radius
- (and the size of the plot) to [-3:3].
- ?set samples
- ?show samples
- ?samples
- The sampling rate of functions may be changed by the `set samples`
- command. By default, sampling is set to 160 points. A higher
- sampling rate will produce more accurate plots, but will take
- longer. When plotting datafiles, the sampling rate must be set
- higher than the number of data points (exactly equal to first dimension
- of grid data points for splot).
-
- Syntax:
- set samples <expression>
- show samples
- ?set size
- ?show size
- ?size
- The `set size` command scales the displayed size of the plot.
- On some terminals, changing the size of the plot will result in
- text being misplaced. Increasing the size of the plot may
- produce strange results. Decreasing is safer.
-
- Syntax:
-
- set size {x,y}
- show size
-
- The x and y values are the scaling factors for the size.
- The defaults (1,1) are selected if the scaling factors are omitted.
-
- Examples:
-
- To set the size to normal size use:
- set size
- To make the plot half size use:
- set size 0.5,0.5
- To show the size use:
- show size
-
- For the LaTeX and Fig terminals the default size (scale factor 1,1)
- is 5 inches wide by 3 inches high. Note that the size of the plot
- includes the space used by the labels; the plotting area itself is
- smaller.
- ?set style
- ?show style
- ?style
- Plots may be displayed in one of five styles: `lines`, `points`,
- `linespoints`, `impulses`, or `dots`. The `lines` style connects
- adjacent points with lines. The `points` style displays a small
- symbol at each point. The `linespoints` style does both `lines` and
- `points`. The `impulses` style displays a vertical line from the X
- axis to each point. The `dots` style plots a tiny dot at each data
- point; this is useful for scatter plots with many points.
-
- Default styles are chosen with the `set function style` and `set
- data style` commands. See `plot style` for information about how
- to override the default plotting style for individual functions.
-
- Syntax:
- set function style <style>
- set data style <style>
- show function style
- show data style
-
- Where <style> is either `lines`, `points`, `linespoints`, `impulses`,
- or `dots`.
- ?set surface
- ?set nosurface
- ?show surface
- ?surface
- Controls the display of surfaces. Useful if contours are to be displayed
- by themselves. See also 'set contour'.
-
- Syntax:
- set surface
- set nosurface
- show surface
- ?set terminal
- ?show terminal
- ?terminal
- GNUPLOT supports many different graphics devices. Use the `set
- terminal` command to select the type of device for which GNUPLOT
- will produce output.
-
- Syntax:
- set terminal {<terminal-type>}
- show terminal
-
- If <terminal-type> is omitted, GNUPLOT will list the available
- terminal types. <terminal-type> may be abbreviated.
-
- Use `set output` to redirect this output to a file or device.
- ?set tics
- ?show tics
- ?tics
- By default, tics are drawn inwards from the border on all four sides.
- The `set tics` command can be used to change the tics to be
- drawn outwards on the left and bottom borders only.
- This is useful when doing impulse plots.
-
- Syntax:
- set tics {<direction>}
- show tics
-
- Where <direction> may be `in`, `out` or nothing (which is the same as in).
-
- See also the `set xtics` `set ytics` and `set ztics` command for more
- control of tic marks.
- ?set title
- ?show title
- ?title
- The `set title` command produces a plot title which will be centered
- at the top of the plot. Using the optional x/y screen offsets, the
- title can be arbitrarily placed anywhere on the plot. `set title`
- with no parameters clears the title.
-
- Syntax:
- set title {"title-text"} {x}{,y}
- show title
-
- Specifing x or y as optional offsets for the title will move the title
- x or y character screen coordinates. All parameters are optional; for
- example:
-
- set title ,-1
-
- will change only the y offset of the title.
-
- (The Latex, EEPIC, and Imagen drivers allow \\ in a string to specify
- a newline.)
- ?set trange
- ?show trange
- ?trange
- The `set trange` command sets the parametric range used to compute
- x and y values when in parametric mode. If not in parametric mode
- (see `set parametric`) then this range is not used. This command
- does not affect XY autoscaling or XY ranges.
-
- This range may also be specified on the `plot` command line when
- in parametric mode.
-
- Syntax:
- set trange [{<tmin> : <tmax>}]
-
- Where <tmin> and <tmax> terms are expressions or constants.
-
- Both the <tmin> and <tmax> terms are optional. Anything omitted will
- not be changed, so
- set trange [:10]
- changes tmax to 10 without affecting tmin.
- ?set view
- ?show view
- ?view
- The `set view` command sets the view for 3-d splots. It controls
- both rotation and scaling of the display and support only orthographic
- projection.
-
- Syntax:
- set view rot_x {,{rot_z}{,{scale}{,scale_z}}}
- show view
-
- Where rot_x and rot_z controls the rotation angles (in degrees) along the
- screen x and z (perpendicular to screen) axes. The rot_x variable is
- bounded to the [0:180] range with default being 60 degree while rot_z
- variable is bounded to [0:360] range and default of 30 degrees.
- scale controls scaling of the entire splot while scale_z will scale the
- z axis only and both default to 1.0.
-
- Examples:
- set view 60, 30, 1, 1
- set view ,,0.5
-
- Will set all the four default values in the first example and change
- only scale to a half in the second example.
- ?show variables
- The `show variables` command lists all user-defined variables and
- their values.
-
- Syntax:
- show variables
- ?set xlabel
- ?show xlabel
- ?xlabel
- The `set xlabel` command sets the x-axis label, which will be centered
- along the plot x axis. Using the optional x/y screen offsets, the
- label can be arbitrarily placed anywhere on the plot. `set xlabel`
- with no parameters clears the label.
-
- Syntax:
- set xlabel {"label"} {x}{,y}
- show xlabel
-
- Specifing x or y as optional offsets for the label will move the label
- x or y character screen coordinates. All parameters are optional; for
- example:
-
- set xlabel -1
-
- will change only the x offset of the xlabel.
-
- (The Latex, EEPIC, and Imagen drivers allow \\ in a string to specify
- a newline.)
- ?set xrange
- ?show xrange
- ?xrange
- The `set xrange` command sets the horizontal range which will be
- displayed. This command turns X axis autoscaling OFF.
-
- This range may also be specified on the `plot` command line.
-
- Syntax:
- set xrange [{<xmin> : <xmax>}]
-
- Where <xmin> and <xmax> terms are expressions or constants.
-
- Both the <xmin> and <xmax> terms are optional. Anything omitted will
- not be changed, so
- set xrange [:10]
- changes xmax to 10 without affecting xmin.
- ?set xtics
- ?set noxtics
- ?show xtics
- ?xtics
- ?noxtics
- Very fine control of the `x` axes tic marks is possible with the `set
- xtics` and `set noxtics` command. The x-axis tic marks may be turned
- off with the `set noxtics` command. They may be turned on (the
- default state) with `set xtics`.
-
- If you prefer your own series of tic marks, you may use the form
- set xtics <start>, <incr>{, <end>}
- The curly braces indicate that the <end> parameter is optional.
- This command specifies that a series of tics will be plotted on the
- `x` axis between the `x` values <start> and <end> with an increment
- of <incr>. If <end> is not given it is assumed to be infinity. The
- increment may be negative. Example:
- set xtics 0,.5,10
- makes tics 0, 0.5, 1, 1.5, ..., 9.5, 10.
-
- If you need arbitrary tic positions, or non-numeric tic labels,
- any non-empty set of tic positions and labels may be given with this
- format:
- set xtics ({"label"} pos {, {"label"} pos}...)
- Again curly braces contain optional components. Thus, a set of tics
- are a set of positions, each with its own optional label. Note that
- the label is a string enclosed by quotes, and may be a constant
- string, such as "hello", or contain formatting information for the tic
- number (which is the same as the position), such as "%3f clients".
- See `set format` for more information about this case. The label may
- even be empty. Examples:
- set xtics ("low" 0, "medium" 50, "high" 100)
- set xtics (1,2,4,8,16,32,64,128,256,512,1024)
- set xtics ("bottom" 0, "" 10, "top" 20)
-
- Tics will only be plotted when in range.
-
- The `set ytics` and `set noytics` commands work identically.
- See also `set format` command.
- ?set xzeroaxis
- ?show xzeroaxis
- ?xzeroaxis
- `set xzeroaxis` draws the x-axis. By default, this option is on.
- `set noxzeroaxis` causes gnuplot to omit the x-axis.
-
- Syntax:
- set xzeroaxis
- set noxzeroaxis
- show xzeroaxis
- ?set yzeroaxis
- ?show yzeroaxis
- ?yzeroaxis
- `set yzeroaxis` draws the y-axis. By default, this option is on.
- `set noyzeroaxis` causes gnuplot to omit the y-axis.
-
- Syntax:
- set yzeroaxis
- set noyzeroaxis
- show yzeroaxis
- ?set ylabel
- ?show ylabel
- ?ylabel
- The `set ylabel` command sets the y-axis label.
- The position of this label depends on the terminal, and can be
- one of the following three positions.
-
- 1. Horizontal text flushed left at the top left of the plot.
- Terminals that cannot rotate text will probably use this method.
-
- 2. Vertical text centered vertically at the left of the plot.
- Terminals that can rotate text will probably use this method.
-
- 3. Horizontal text centered vertically at the left of the plot.
- The Latex and EEPIC drivers use this method. The user must insert
- line breaks using \\ to prevent the ylabel from overwriting
- the plot. To produce a vertical row of characters, add \\
- between every printing character.
-
- Syntax:
- set ylabel {"label"} {x}{,y}
- show ylabel
-
- With no parameters, the label is cleared.
- Specifing x or y as optional offsets for the label will move the label
- x or y character screen coordinates. All parameters are optional; for
- example:
-
- set ylabel "ylabel" ,-1
-
- will change only the label and the y offset of the ylabel.
-
- (The Latex, EEPIC, and Imagen drivers allow \\ in a string to specify
- a newline.)
- ?set yrange
- ?show yrange
- ?yrange
- The `set yrange` command sets the vertical range which will be
- displayed. This command turns Y axis autoscaling OFF.
-
- This range may also be specified on the `plot` command line.
-
- Syntax:
- set yrange [{<ymin> : <ymax>}]
-
- Where <ymin> and <ymax> terms are expressions or constants.
-
- Both the <ymin> and <ymax> terms are optional. Anything omitted will
- not be changed, so
- set yrange [:10]
- changes ymax to 10 without affecting ymin.
- ?set ytics
- ?set noytics
- ?show ytics
- ?ytics
- ?noytics
- The `set ytics` and `set noytics` commands are similar to the `set xtics`
- and `set noxtics` commands. Please see `set xtics`.
- ?set zlabel
- ?show zlabel
- ?zlabel
- The `set zlabel` command sets the z-axis label, which will be centered
- along the plot z axis. Using the optional x/y screen offsets, the
- label can be arbitrarily placed anywhere on the plot. `set zlabel`
- with no parameters clears the label.
-
- Syntax:
- set zlabel {"label"} {x}{,y}
- show zlabel
-
- Specifing x or y as optional offsets for the label will move the label
- x or y character screen coordinates. All parameters are optional; for
- example:
-
- set zlabel ,1
-
- will change only the y offset of the zlabel.
-
- (The Latex, EEPIC, and Imagen drivers allow \\ in a string to specify
- a newline.)
- ?set zrange
- ?show zrange
- ?zrange
- The `set zrange` command sets the vertical range which will be
- displayed. This command turns Z axis autoscaling OFF.
-
- This range may also be specified on the `splot` command line.
-
- Syntax:
- set zrange [{<zmin> : <zmax>}]
-
- Where <zmin> and <zmax> terms are expressions or constants.
-
- Both the <zmin> and <zmax> terms are optional. Anything omitted will
- not be changed, so
- set zrange [2:]
- changes zmin to 2 without affecting zmax.
- ?set zero
- ?show zero
- ?zero
- GNUPLOT will not plot a point if its imaginary part is greater in
- magnitude than the `zero` threshold. The default `zero` value is
- 1e-8. This can be changed with the `set zero` command.
-
- Syntax:
- set zero <expression>
- show zero
- ?set zeroaxis
- ?show zeroaxis
- ?zeroaxis
- `set zeroaxis` draws the x-axis and y-axis. By default, this option is on.
- `set noxzeroaxis` causes gnuplot to omit the axes.
-
- Syntax:
- set zeroaxis
- set nozeroaxis
- show zeroaxis
- See `set xzeroaxis` and `set yzeroaxis`.
- ?shell
- The `shell` command spawns an interactive shell. To return to
- GNUPLOT, type `logout` if using VMS, `exit` or your END-OF-FILE
- character if using Unix, or `exit` if using MS-DOS.
-
- A single shell command may be spawned by preceding it with the !
- character ($ if using VMS) at the beginning of a command line.
- Control will return immediately to GNUPLOT after this command is
- executed. For example,
-
- ! dir
-
- prints a directory listing and then returns to GNUPLOT.
- ?startup
- ?start
- ?.gnuplot
- When GNUPLOT is run, it looks for an initialization file to load.
- This file is called `.gnuplot` on Unix systems, and `GNUPLOT.INI` on
- other systems. If this file is not found in the current directory,
- the program will look for it in your home directory (under MS-DOS, the
- environment variable GNUPLOT should contain the name of this
- directory).
-
- If this file is found, GNUPLOT executes the commands in this file.
- This is most useful for setting your terminal type and defining any
- functions or variables which you use often. The variable `pi` is
- already defined for you.
- ?substitution
- Command-line substitution is specified by a system command enclosed in
- backquotes. This command is spawned and the output it produces
- replaces the name of the command (and backquotes) on the command line.
-
- Newlines in the output produced by the spawned command are replaced with
- blanks.
-
- Command-line substitution can be used anywhere on the GNUPLOT command
- line.
-
-
- Example:
-
- This will run the program `leastsq` and substitute `leastsq`
- (including quotes) on the command line with its output:
-
- f(x) = `leastsq`
-
- or, in VMS
-
- f(x) = `run leastsq`
- ?userdefined
- ?variables
- You may define your own functions and variables. User-defined
- functions and variables may be used anywhere.
-
- User-defined function syntax:
- <function-name> ( <dummy-var> ) = <expression>
-
- Where <expression> is defined in terms of <dummy-var>.
-
- User-defined variable syntax:
- <variable-name> = <constant-expression>
-
- Examples:
- w = 2
- q = floor(tan(pi/2 - 0.1))
- f(x) = sin(w*x)
- sinc(x) = sin(pi*x)/(pi*x)
- delta(t) = (t == 0)
- ramp(t) = (t > 0) ? t : 0
-
- The variable `pi` is already defined for you.
-
- See `show functions` and `show variables`.
- ?bugs
- The atan() function does not work correctly for complex arguments.
-
- The bessel functions do not work for complex arguments.
-
- The most important known bug is actually in the stdio library for the
- Sun4 operating system (SunOS Sys4-3.2). The "%g" format for `printf`
- sometimes incorrectly prints numbers (e.g., 200000.0 as "2"). Thus,
- tic mark labels may be incorrect on a Sun4 version of gnuplot. You
- may work around it by rescaling your data or by using the `set format`
- command to change the tic mark format to "%7.0f" or some other
- appropriate format. This appears to have been fixed in SunOS 4.0.
-
- Another bug: On a Sun3 under SunOS 4.0, and on Sun4's under Sys4-3.2
- and SunOS 4.0, the `sscanf` routine incorrectly parses "00 12" with
- the format "%f %f" and reads 0 and 0 instead of 0 and 12. This
- affects data input. If your data file contains X coordinates that are
- zero but are specified like '00', '000', etc, then you will read the
- wrong Y values. Check your data files or do not use a Sun4 until they
- fix the bug. It does NOT appear that this has been fixed in SunOS 4.0.
-
- Microsoft C 5.1 has a nasty bug associated with the %g format for
- printf. When any of the formats "%.2g", "%.1g", "%.0g", "%.g" are
- used, printf will incorrectly print numbers in the range 1e-4 to 1e-1.
- Numbers that should be printed in the %e format are incorrectly
- printed in the %f format, with the wrong number of zeros after the
- decimal point.
- To work around this problem, use the %e or %f formats explicitly.
-
- Gnuplot when compiled with Microsoft C did not work correctly on two
- VGA displays that were tested. The CGA, EGA and VGA drivers should
- probably be rewritten to use the Microsoft C graphics library.
- Gnuplot compiled with Turbo C uses the Turbo C graphics drivers and
- does work correctly with VGA displays.
-
- VAX/VMS 4.7 C compiler release 2.4 also has a poorly implemented %g
- format for printf. The numbers are printed numerically correct, but
- may not be in the requested format. The K&R second edition says that
- for the %g format, %e is used if the exponent is less than -4 or greater
- than or equal to the precision. The VAX uses %e format if the exponent
- is less than -1. The VAX appears to take no notice of the precision
- when deciding whether to use %e or %f for numbers less than 1.
- To work around this problem, use the %e or %f formats explicitly.
- From the VAX C 2.4 release notes:
- e,E,f,F,g,G Result will always contain a decimal point.
- For g and G, trailing zeros will not be removed from the result.
-
- VAX/VMS 5.2 C compiler release 3.0 has a slightly better implemented
- %g format than release 2.4, but not much. Trailing decimal points are
- now removed, but trailing zeros are still not removed from %g numbers
- in exponential format.
-
- Please report any bugs you find to pixar!bug-gnuplot@sun.com or
- pixar!bug-gnuplot@ucbvax.berkeley.edu.
-