home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-10-26 | 48.6 KB | 1,417 lines |
- Newsgroups: comp.sources.misc
- From: gershon%gr@cs.utah.edu (Elber Gershon)
- Subject: v24i031: gnuplot3 - interactive function plotting utility, Part09/26
- Message-ID: <1991Oct26.222419.6640@sparky.imd.sterling.com>
- X-Md4-Signature: 1b42ad6f70c61f371e475ea330220443
- Date: Sat, 26 Oct 1991 22:24:19 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: gershon%gr@cs.utah.edu (Elber Gershon)
- Posting-number: Volume 24, Issue 31
- Archive-name: gnuplot3/part09
- Environment: UNIX, MS-DOS, VMS
- Supersedes: gnuplot2: Volume 11, Issue 65-79
-
- #!/bin/sh
- # this is Part.09 (part 9 of a multipart archive)
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file gnuplot/docs/gnuplot.doc continued
- #
- if test ! -r _shar_seq_.tmp; then
- echo 'Please unpack part 1 first!'
- exit 1
- fi
- (read Scheck
- if test "$Scheck" != 9; then
- echo Please unpack part "$Scheck" next!
- exit 1
- else
- exit 0
- fi
- ) < _shar_seq_.tmp || exit 1
- if test ! -f _shar_wnt_.tmp; then
- echo 'x - still skipping gnuplot/docs/gnuplot.doc'
- else
- echo 'x - continuing file gnuplot/docs/gnuplot.doc'
- sed 's/^X//' << 'SHAR_EOF' >> 'gnuplot/docs/gnuplot.doc' &&
- X `dots`, or `errorbars`. The <linetype> and <pointtype> are positive
- X integer constants or expressions and specify the line type and point
- X type to be used for the plot. Line type 1 is the first line type used
- X by default, line type 2 is the second line type used by default, etc.
- X
- X Examples:
- X
- X This plots sin(x) with impulses:
- X plot sin(x) with impulses
- X
- X This plots x*y with points, x**2 + y**2 default:
- X splot x*y w points, x**2 + y**2
- X
- X This plots tan(x) with the default function style, "data.1" with lines:
- X plot [ ] [-2:5] tan(x), "data.1" with l
- X
- X This plots "leastsq.dat" with impulses:
- X plot 'leastsq.dat' w i
- X
- X This plots "exper.dat" with errorbars and lines connecting the points:
- X plot 'exper.dat' w lines, 'exper.dat' w errorbars
- X Here 'exper.dat' should have three or four data columns.
- X
- X This plots x**2 + y**2 and x**2 - y**2 with the same line type:
- X splot x**2 + y**2 with line 1, x**2 - y**2 with line 1
- X
- X This plots sin(x) and cos(x) with linespoints, using the
- X same line type but different point types:
- X plot sin(x) with linesp 1 3, cos(x) with linesp 1 4
- X
- X This plots file "data" with points style 3:
- X plot "data" with points 1 3
- X Note that the line style must be specified when specifying the point
- X style, even when it is irrelevant. Here the line style is 1 and the
- X point style is 3, and the line style is irrelevant.
- X
- X See `set style` to change the default styles.
- 3 title
- ?plot title
- ?splot title
- X A title of each plot appears in the key. By default the title is
- X the function or file name as it appears on the plot command line.
- X The title can be changed by using the `title` option. This option
- X should precede any `with` option.
- X
- X Syntax:
- X title "<title>"
- X
- X where <title> is the new title of the plot and must be enclosed in
- X quotes. The quotes will not be shown in the key.
- X
- X Examples:
- X
- X This plots y=x with the title 'x':
- X plot x
- X
- X This plots the "glass.dat" file with the title 'surface of revolution':
- X splot "glass.dat" title 'surface of revolution'
- X
- X This plots x squared with title "x^2" and "data.1" with title
- X 'measured data':
- X plot x**2 title "x^2", "data.1" t 'measured data'
- 2 print
- ?print
- X The `print` command prints the value of <expression> to the screen.
- X
- X Syntax:
- X print <expression>
- X
- X See `expressions`.
- 2 pwd
- ?pwd
- X The `pwd` command prints the name of the working directory to the screen.
- X
- X Syntax:
- X pwd
- 2 quit
- ?quit
- X The `exit` and `quit` commands and END-OF-FILE character will exit
- X GNUPLOT. All these commands will clear the output device (as the
- X `clear` command does) before exiting.
- 2 replot
- ?replot
- X The `replot` command without arguments repeats the last `plot` or `splot`
- X command. This can be useful for viewing a plot with different `set`
- X options, or when generating the same plot for several devices.
- X
- X Arguments specified after a `replot` command will be added onto the last
- X `plot` (`splot`) command (with an implied ',' separator) before it is
- X repeated. `replot` accepts the same arguments as the `plot` (`splot`)
- X commands except that ranges cannot be specified. See `command-line
- X editing` for ways to edit the last `plot` (`splot`) command.
- 2 save
- ?save
- X The `save` command saves user-defined functions, variables, set
- X options or all three plus the last `plot` (`splot`) command to the
- X specified file.
- X
- X Syntax:
- X save {<option>} "<filename>"
- X
- X where <option> is `functions`, `variables` or `set`. If no option is
- X used, GNUPLOT saves functions, variables, set options and the last `plot`
- X (`splot`) command.
- X
- X `save`d files are written in text format and may be read by the `load`
- X command.
- X
- X The filename must be enclosed in quotes.
- X
- X Examples:
- X
- X save "work.gnu"
- X save functions 'func.dat'
- X save var 'var.dat'
- X save set "options.dat"
- 2 set-show
- ?set
- ?show
- X The `set` command sets LOTS of options.
- X
- X The `show` command shows their settings. `show all` shows all the
- X settings.
- 3 angles
- ?set angles
- ?show angles
- ?angles
- X By default, GNUPLOT assumes the independent variable in polar plots
- X is in units of radians. If `set angles degrees` is specified before
- X `set polar` then the default range is [0:360] and the independent
- X variable has units of degrees. This is particularly useful for
- X plots of data files. The angle setting also hold for the 3-d
- X mapping as set via the `set mapping` command.
- X
- X Syntax:
- X set angles { degrees | radians }
- X show angles
- 3 arrow
- ?set arrow
- ?set noarrow
- ?show arrow
- ?arrow
- ?noarrow
- X Arbitrary arrows can be placed on a plot using the `set arrow`
- X command.
- X
- X Syntax:
- X
- X set arrow {<tag>} {from <sx>,<sy>{,<sz>}}
- X {to <ex>,<ey>{,<ez>}} {{no}head}
- X set noarrow {<tag>}
- X show arrow
- X
- X
- X Unspecified coordinates default to 0. The x, y, and z values are in
- X the graph's coordinate system. The z coordinate is only used in
- X `splot` commands. <tag> is an integer that identifies the arrow. If no
- X tag is given, the lowest unused tag value is assigned automatically.
- X The tag can be used to delete or change a specific arrow. To change
- X any attribute of an existing arrow, use the `set arrow` command with
- X the appropriate tag, and specify the parts of the arrow to be
- X changed. Specifying nohead requests the arrow be drawn without a head
- X (yielding a line segment). By default, arrows have heads.
- X
- X Arrows outside the plotted boundaries are permitted but may cause
- X device errors.
- X
- X Examples:
- X
- X To set an arrow pointing from the origin to (1,2), use:
- X set arrow to 1,2
- X To set an arrow from (-10,4,2) to (-5,5,3), and tag the arrow number
- X 3, use:
- X set arrow 3 from -10,4,2 to -5,5,3
- X To change the preceding arrow begin at 1,1,1, without an arrow head,
- X use:
- X set arrow 3 from 1,1,1 nohead
- X To delete arrow number 2 use:
- X set noarrow 2
- X To delete all arrows use:
- X set noarrow
- X To show all arrows (in tag order) use:
- X show arrow
- 3 autoscale
- ?set autoscale
- ?set noautoscale
- ?show autoscale
- ?autoscale
- ?noautoscale
- X Auto scaling may be set individually on the x, y or z axis
- X or globally on all axes. The default is to autoscale all axes.
- X
- X When autoscaling, the plot range is automatically computed and the
- X dependent axis (y for a `plot` and z for `splot`) is scaled to
- X include the range of the function or data being plotted.
- X
- X If autoscaling of the dependent axis (y or z) is not set, the
- X current y or z range is used.
- X
- X See `set yrange` or `set zrange`.
- X
- X Autoscaling the independent variables (x for `plot` and x,y for
- X `splot`) is a request to set the domain to match any data file being
- X plotted. If there are no data files then autoscaling an independent
- X variable has no effect. In other words, in the absence of a data
- X file, functions alone do not affect the x range (or the y range if
- X plotting z = f(x,y)).
- X
- X See `set xrange`, or `set yrange`.
- X
- X The behavior of autoscaling remains consistent in parametric mode,
- X however, there are more dependent variables and hence more control
- X over x, y, and z plot scales. In parametric mode, the independent or
- X dummy variable is t for `plot`s and u,v for `splot`s. Autoscale in
- X parametric mode, then, controls all ranges (t, u, v, x, y, and z) and
- X allows x, y, and z to be fully autoscaled.
- X
- X See `set parametric`.
- X
- X Syntax:
- X set autoscale <axes>
- X set noautoscale <axes>
- X show autoscale
- X
- X where <axes> is either `x`, `y`, `z` or `xy`. If <axes> is not given
- X then all axes are assumed.
- X
- X Examples:
- X
- X This sets autoscaling of the y axis. x axis autoscaling is not
- X affected.
- X set autoscale y
- X
- X This sets autoscaling of the x and y axes.
- X set autoscale xy
- X
- X This sets autoscaling of the x, y and z axes.
- X set autoscale
- X
- X This disables autoscaling of the x, y and z axes.
- X set noautoscale
- X
- X This disables autoscaling of the z axis only.
- X set noautoscale z
- 4 parametric mode
- ?autoscale parametric
- ?set autoscale t
- X When in parametric mode (`set parametric`) the xrange is as
- X fully scalable as the yrange. In other words, in parametric
- X mode the x axis can be automatically scaled to fit the range
- X of the parametric function that is being plotted. Of course,
- X the y axis can also be automatically scaled just as in the
- X non-parametric case. If autoscaling on the x axis is not set,
- X the current x range is used.
- X
- X When there is a mix of data files and functions, the xrange of
- X the functions is selected as that of the data files if autoscale
- X is true for x. While this keeps the behavior compatible with
- X non-parametric plotting, it may not be retained in the future.
- X The problem is that, in parametric mode, the x and y ranges are
- X not as distinguishable as in the non-parametric mode and this
- X behavior may not be the most useful.
- X
- X For completeness a last command `set autoscale t` is accepted.
- X However, the effect of this "scaling" is very minor. When
- X GNUPLOT determines that the t range would be empty it makes a
- X small adjustment if autoscaling is true. Otherwise, GNUPLOT
- X gives an error. Such behavior may, in fact, not be very useful
- X and the command `set autoscale t` is certainly questionable.
- X
- X `splot` extends the above idea similarly. If autoscaling is set then
- X x, y, and z ranges are computed and each axis scaled to fit the
- X resulting data.
- 3 border
- ?set border
- ?set noborder
- ?show border
- ?border
- ?noborder
- X The `set border` and `set noborder` commands controls the display of
- X the plot borders for the `plot` and `splot` commands.
- X
- X Syntax:
- X set border
- X set noborder
- X show border
- 3 clip
- ?set clip
- ?set noclip
- ?show clip
- ?clip
- ?noclip
- X GNUPLOT can clip data points and lines that are near the boundaries
- X of a plot.
- X
- X Syntax:
- X set clip <clip-type>
- X set noclip <clip-type>
- X show clip
- X
- X Three clip types are supported by GNUPLOT: `points`, `one`, and `two`.
- X One, two, or all three clip types may be active for a single plot.
- X
- X The `points` clip type forces GNUPLOT to clip (actually, not plot at
- X all) data points that fall within but too close to the boundaries
- X (this is so the large symbols used for points will not extend outside
- X the boundary lines). Without clipping points near the boundaries may
- X look bad; try adjusting the x and y ranges.
- X
- X Setting the `one` clip type causes GNUPLOT to plot the line segments
- X which have only one of the two endpoints with the plotting region.
- X Only the in-range portion of the line is drawn. The alternative is to
- X not draw any portion of the line segment.
- X
- X Some lines may have both endpoints out of range, but pass through the
- X plotting area. Setting the `two` clip-type allows the visible portion
- X of these lines to be drawn.
- X
- X In no case is a line drawn outside the plotting area.
- X
- X The defaults are `noclip points`, `clip one`, and `noclip two`.
- X
- X To check the state of all forms of clipping, use
- X show clip
- X
- X For backward compatibility with older versions, the following forms
- X are also permitted.
- X set clip
- X set noclip
- X `set clip` is synonymous with `set clip points`. `set noclip` turns
- X off all three types of clipping.
- 3 Cntrparam
- ?set cntrparam
- ?show cntrparam
- ?cntrparam
- X Sets the different parameters for the contouring plot (see also `contour`).
- X
- X Syntax:
- X set cntrparam { { linear | cubicspline | bspline } |
- X points <n> |
- X levels <n> |
- X order <n> }
- X
- X This command controls the way contours are plotted. <n> should be an
- X integral constant expression. The parameters are:
- X
- X `linear`, `cubicspline`, `bspline` - Controls type of approximation or
- X interpolation. If `linear`, then the contours are drawn piecewise
- X linear, as extracted from the surface directly. If `cubicspline`, then
- X piecewise linear contours are interpolated to form a somewhat smoother
- X contours, but which may undulate. The third option is the uniform
- X `bspline`, which only approximates the piecewise linear data but is
- X guaranteed to be smoother.
- X
- X `points` - Eventually all drawings are done with piecewise linear
- X strokes. This number controls the number of points used to
- X approximate a curve. Relevant for `cubicspline` and `bspline` modes
- X only.
- X
- X `levels` - Number of contour levels. If the surface is bounded by zmin
- X and zmax then contours will be generated from zmin+dz to zmax-dz
- X in steps of size dz, where dz = (zmax - zmin) / (levels + 1).
- X
- X `order` - Order of the bspline approximation to be used. The bigger this
- X order is, the smoother the resulting contour. (Of course, higher order
- X bspline curves will move further away from the original peicewise linear
- X data.) This option is relevant for `bspline` mode only. Allowed values are
- X integers in the range from 2 (linear) to 10.
- 3 contour
- ?set contour
- ?show contour
- ?contour
- X Enable contour drawing for surfaces. This option is available for `splot`
- X only.
- X
- X Syntax:
- X set contour { base | surface | both }
- X set nocontour
- X
- X If no option is provided to `set contour`, the default is `base`.
- X The three options specify where to draw the contours: `base` draws
- X the contours on the grid base where the x/ytics are placed, `surface`
- X draws the contours on the surfaces themselves, and `both` draws the
- X contours on both the base and the surface.
- X
- X See also `set cntrparam` for the parameters that affect the drawing of
- X contours.
- 3 data style
- ?set data style
- ?show data style
- ?data style
- X The `set data style` command changes the default plotting style
- X for data plots.
- X
- X Syntax:
- X set data style
- X show data style
- X set data style <style-choice>
- X
- X In the first case, `set data style` returns the possible style
- X choices: `lines`, `points`, `linespoints`, `dots`, `impulses`,
- X or `errorbars`. `show data style` shows the current default
- X plotting style for data. `set data style dots` would actually
- X change the default plotting style. See also `plot`.
- 3 dummy
- ?set dummy
- ?show dummy
- ?dummy
- X By default, GNUPLOT assumes that the independent variable for the
- X `plot` command is x, and the independent variables for the `splot`
- X command are x and y. They are called the dummy variables because it
- X is just a notation to indicate the independent variables. The `set
- X dummy` command changes these default dummy variable names. For
- X example, it may be more convenient to call the dummy variable t
- X when plotting time functions:
- X
- X set dummy t
- X plot sin(t), cos(t)
- X
- X Syntax:
- X set dummy <dummy-var>{,<dummy-var>}
- X show dummy
- X
- X Examples:
- X set dummy u,v
- X set dummy ,s
- X
- X to set both dummy variables to u and v or set only the second
- X variable to s.
- X
- X The `set parametric` command also changes the dummy variables (to t
- X for `plot` and u,v for `splot`s).
- X
- 3 format
- ?set format
- ?show format
- ?format
- X The format of the tic-mark labels can be set with the `set format`
- X command. The default format for both axes is "%g", but other formats
- X such as "%.2f" or "%3.0fm" are often desirable. Anything accepted by
- X printf when given a double precision number, and then accepted by the
- X terminal, will work. In particular, the formats f, e, and g will work,
- X and the d, o, x, c, s, and u formats will not work.
- X
- X Syntax:
- X set format {<axes>} {"<format-string>"}
- X show format
- X
- X where <axes> is either `x`, `y`, `z`, `xy`, or nothing (which is the
- X same as `xy`). The length of the string representing a ticmark (after
- X formatting with printf) is restricted to 100 characters. If the
- X format string is omitted, the format will be returned to the default
- X "%g". For LaTeX users, the format "$%g$" is often desirable. If the
- X empty string "" is used, no label will be plotted with each tic,
- X though the tic mark will still be plotted. To eliminate all tic marks,
- X use `set noxtics` or `set noytics`.
- X
- X See also `set xtics` and `set ytics` for more control over tic labels.
- 3 function style
- ?set function style
- ?show function style
- ?function style
- X The `set function style` command changes the default plotting style
- X for functions.
- X
- X Syntax:
- X set function style
- X show function style
- X set function style <style-choice>
- X
- X In the first case, `set function style` returns the possible style
- X choices: `lines`, `points`, `linespoints`, `dots`, `impulses`,
- X or `errorbars`. `show function style` shows the current default
- X plotting style for functions. `set function style linespoints`
- X would actually change the default plotting style. See also `plot`.
- 3 functions
- ?show functions
- X The `show functions` command lists all user-defined functions and
- X their definitions.
- X
- X Syntax:
- X show functions
- 3 grid
- ?set grid
- ?show grid
- ?grid
- X The optional `set grid` draws a grid at the tic marks with the axis
- X linetype.
- X
- X Syntax:
- X set grid
- X set nogrid
- X show grid
- 3 isosamples
- ?set isosamples
- ?show isosamples
- ?isosamples
- X An isoline is a curve parametrized by one of the surface parameters
- X while the other surface parameter is fixed. Isolines are a simple
- X means to display a surface. By fixing the u parameter of surface
- X s(u,v), the iso-u lines of the form c(v) = s(u0,v) are produced, and
- X by fixing the v parameter, the iso-v lines of the form c(u) = s(u,v0)
- X are produced.
- X
- X The isoline density of surfaces may be changed by the `set isosamples`
- X command. By default, sampling is set to 10 isolines per u or v axis.
- X A higher sampling rate will produce more accurate plots, but will take
- X longer. This parameter has no effect on data file plotting.
- X
- X Syntax:
- X set isosamples <expression>
- X show isosamples
- 3 key
- ?set key
- ?show key
- ?key
- X The `set key` enables a key describing curves on a plot. By default
- X the key is placed in the upper right corner of the plot.
- X
- X Syntax:
- X set key
- X set key <x>,<y>{,<z>}
- X set nokey
- X show key
- X
- X The coordinates <x>, <y> (and <z> for `splot`s) specify the location
- X of the key on the plot. The key is drawn as a sequence of lines, with
- X one plot described on each line. On the right hand side of each line
- X is a representation that attempts to mimic the way the curve is
- X plotted. On the left side of each line is the text description,
- X obtained from the `plot` command. See `plot title` to change this
- X description. The lines are vertically arranged so an imaginary
- X straight line divides the left- and right-hand sides of the key. It is
- X the coordinates of this line that are specified with the `set key`
- X command. In a `plot`, only the x and y coordinates are used to specify
- X the line position. For a `splot`, x, y and z are all being used as a
- X 3-d location mapped using the same mapping as the plot itself to form
- X the required 2-d screen position of the imaginary line.
- X
- X Some or all of the key may be outside of the plot boundary, although
- X this may interfere with other labels and may cause an error on some
- X devices.
- X
- X Examples:
- X
- X This places the key at the default location:
- X set key
- X This disables the key:
- X set nokey
- X This places a key at coordinates 2,3.5,2
- X set key 2,3.5,2
- 3 label
- ?set label
- ?set nolabel
- ?show label
- ?label
- ?nolabel
- X Arbitrary labels can be placed on the plot using the `set label`
- X command. If the z coordinate is given on a `plot` it is ignored; if
- X it is missing on a `splot` it is assumed to be 0.
- X
- X Syntax:
- X
- X set label {<tag>} {"<label_text>"} {at <x>,<y>{,<z>}}
- X {<justification>}
- X set nolabel {<tag>}
- X show label
- X
- X
- X The text defaults to "", and the position to 0,0,0. The <x>, <y>, and
- X <z> values are in the graph's coordinate system. The tag is an
- X integer that is used to identify the label. If no <tag> is given, the
- X lowest unused tag value is assigned automatically. The tag can be used
- X to delete or change a specific label. To change any attribute of an
- X existing label, use the `set label` command with the appropriate tag,
- X and specify the parts of the label to be changed.
- X
- X By default, the text is placed flush left against the point x,y,z.
- X To adjust the way the label is positioned with respect to the point
- X x,y,z, add the parameter <justification>, which may be `left`, `right`
- X or `center`, indicating that the point is to be at the left, right or
- X center of the text. Labels outside the plotted boundaries are
- X permitted but may interfere with axes labels or other text.
- X
- X Examples:
- X
- X To set a label at (1,2) to "y=x" use:
- X set label "y=x" at 1,2
- X To set a label "y=x^2" with the right of the text at (2,3,4), and tag
- X the label number 3, use:
- X set label 3 "y=x^2" at 2,3,4 right
- X To change the preceding label to center justification, use:
- X set label 3 center
- X To delete label number 2 use:
- X set nolabel 2
- X To delete all labels use:
- X set nolabel
- X To show all labels (in tag order) use:
- X show label
- X
- X (The Latex, EEPIC, and Imagen drivers allow \\ in a string to specify
- X a newline.)
- 3 logscale
- ?set logscale
- ?set nologscale
- ?show logscale
- ?logscale
- ?nologscale
- X Log scaling may be set on the x, y, and z axes.
- X
- X Syntax:
- X set logscale <axes>
- X set nologscale <axes>
- X show logscale
- X
- X where <axes> may be any combinations of `x`, `y`, and `z`, in any
- X order. If <axes> is not given then all three axes are assumed. The
- X command `set logscale` turns on log scaling on the specified axes,
- X while `set nologscale` turns off log scaling.
- X
- X Examples:
- X
- X To enable log scaling in both x and z axes:
- X set logscale xz
- X To disable z axis log scaling:
- X set nologscale z
- 3 mapping
- ?set mapping
- ?show mapping
- ?mapping
- X
- X Syntax:
- X set mapping { cartesian | spherical | cylindrical }
- X
- X Data for `splot`s are usually in regular Euclidean space and are
- X provided in Cartesian coordinates. Such 3-d data require three
- X coordinates (x, y and z) or one coordinate (only z) in each line in
- X the data file. In order to be able to use spherical or cylindrical
- X coordinate systems, use the `set mapping` command. In both cases two
- X coordinates are expected in each line of the data. For a spherical
- X coordinate system, these are theta and phi (in units as specified by
- X `set angles`) and the mapping is:
- X
- X x = cos( theta ) * cos( phi )
- X y = sin( theta ) * cos( phi )
- X z = sin( phi )
- X
- X For a cylindrical coordinate system, the mapping uses two variables,
- X theta (in units as specified by `set angles`) and z:
- X
- X x = cos( theta )
- X y = sin( theta )
- X z = z
- X
- X Again, note that mapping will affect data file `splot`s only.
- 3 offsets
- ?set offsets
- ?show offsets
- ?offsets
- X The amount of the graph that the plot takes up may be controlled to
- X some extent with the `set offsets` command. This command takes four
- X offset arguments: <left>, <right>, <top> and <bottom>. By default,
- X each offset is 0. Each offset may be a constant or an expression. Left
- X and right offsets are given in units of the x axis, while top and
- X bottom offsets are given in units of the y axis. The plot of sin(x),
- X displayed with offsets of 0, 0, 2, 2 will take up 1/3 of the
- X displayed y axis. Offsets are particularly useful with polar
- X coordinates as a means of compensating for aspect ratio distortion.
- X Offsets are ignored in `splot`s.
- X
- X Syntax:
- X set offsets <left>, <right>, <top>, <bottom>
- X show offsets
- 3 output
- ?set output
- ?show output
- ?output
- X By default, plots are displayed to the standard output. The `set
- X output` command redirects the display to the specified file or
- X device.
- X
- X Syntax:
- X set output {"<filename>"}
- X show output
- X
- X The filename must be enclosed in quotes. If the filename is
- X omitted, output will be sent to the standard output.
- 3 parametric
- ?set parametric
- ?set noparametric
- ?show parametric
- ?parametric
- ?noparametric
- X The `set parametric` command changes the meaning of `plot` (`splot`)
- X from normal functions to parametric functions. The command
- X `set noparametric` changes the plotting style back to normal,
- X single-valued expression plotting.
- X
- X In 2-d plotting, a parametric function is determined by a pair
- X of parametric functions operating on a parameter. An example
- X of a 2-d parametric function would be plot sin(t),cos(t) (which
- X defines a circle).
- X
- X For 3-d plotting, the surface is described as x=f(u,v), y=g(u,v),
- X z=h(u,v). Therefore a triplet of functions are required. An example of
- X 3-d parametric function would be cos(u)*cos(v),cos(u)*sin(v),sin(u)
- X (which defines a sphere). It takes three parametric function
- X specifications in terms of the parametric dummy arguments to describe
- X a single graph.
- X
- X The total set of possible plots is a superset of the simple f(x)
- X style plots, since the two (three) functions can describe the
- X x and y (and z) values to be computed separately. In fact,
- X plots of the type t,f(t) (u,v,f(u,v)) are equivalent to those
- X produced with f(x) when the x values are computed using the
- X identity function as the first function.
- X
- X Note that the order the parametric functions are specified is
- X xfunction, yfunction (and zfunction) and that each operates over the
- X common parametric domain.
- X
- X Also, the `set parametric` function implies a new range of values.
- X Whereas the normal f(x) and f(x,y) style plotting assume an xrange
- X and yrange (and zrange), the parametric mode additionally specifies a
- X trange, urange, and vrange. These ranges may be set
- X directly with `set trange`, `set urange` and `set vrange`, or by
- X specifying the range on the `plot` or `splot` commands. Currently
- X the default range for these parametric variables is [-5:5].
- X Setting the ranges to something more meaningful is expected.
- 3 polar
- ?set polar
- ?set nopolar
- ?show polar
- ?polar
- ?nopolar
- X The `set polar` command changes the meaning of the plot from
- X rectangular coordinates to polar coordinates. In polar coordinates,
- X the dummy variable (x) is an angle. The range of this angle is changed
- X from whatever it was to [0:2*pi], or, if degree unit has been selected,
- X to [0:360] (see `set angles`).
- X
- X The command `set nopolar` changes the meaning of the plot back to the
- X default rectangular coordinate system. The range of x is changed from
- X whatever it was to [-10:10].
- X
- X The `set polar` command is not supported for `splot`s. See the
- X `set mapping` command for similar functionality for `splot`s.
- X
- X While in polar coordinates the meaning of an expression in x is really
- X r = f(x), where x is an angle of rotation. The xrange controls the
- X domain (the angle) of the function, and the yrange controls the range
- X (the radius). The plot is plotted in a rectangular box, and the x and
- X y axes are both in units of the radius. Thus, the yrange controls both
- X dimensions of the plot output. The tics and units are written along
- X the axes rather than at the left and bottom. These unit are offset by
- X <rmin> specified by the `rrange` (See `set rrange`). It is not
- X possible to specify different output dimensions in the x or y
- X directions. The yrange can be used to shift the plot diagonally to
- X display only the first or third quadrants.
- X
- X Syntax:
- X set polar
- X set nopolar
- X show polar
- X Example:
- X set polar
- X plot x*sin(x)
- X plot [-2*pi:2*pi] [-3:3] x*sin(x)
- X The first plot uses the default polar angular domain of 0 to 2*pi.
- X The radius (and the size of the plot) is scaled automatically. The
- X second plot expands the domain, and restricts the range of the radius
- X (and the size of the plot) to [-3:3].
- 3 rrange
- ?set rrange
- ?show rrange
- ?rrange
- X The `set rrange` command sets the radial range used to compute x and y
- X values when in polar mode. If not in polar mode (see `set polar`) then
- X this range is not used. Use of this command offsets the polar
- X singularity to the <rmin> value and shifts the units on the axes tic
- X marks. For instance, `set rrange [-40:40]` would set the origin to -40
- X and would plot values of radial values between -40 to 40. Thus, if
- X 360 degrees of data were plotted, then the plot would extend 80 units
- X in radially from the origin. To view the entire plot, a
- X `set yrange [-80:80]` command would create a square viewport with
- X a circular plot tangent at the axes. Because `xrange` is used
- X specify the angular extent, only a square viewport can be specified
- X by `yrange`. For instance, `set yrange [0:80]` would display the
- X first quadrant and `set yrange [-80:0]` would display the third
- X quadrant. Any square viewport of any size can be specified but it
- X is constrained to be centered on a 45 degree line.
- X
- X This range may also be specified on the `plot` command line when in
- X polar mode.
- X
- X Syntax:
- X set rrange [{<rmin> : <rmax>}]
- X
- X where <rmin> and <rmax> terms are constants or expressions.
- X
- X Both the <rmin> and <rmax> terms are optional. Anything omitted will
- X not be changed, so
- X set rrange [:10]
- X changes rmax to 10 without affecting rmin.
- 3 samples
- ?set samples
- ?show samples
- ?samples
- X The sampling rate of functions may be changed by the `set samples`
- X command. By default, sampling is set to 100 points. A higher sampling
- X rate will produce more accurate plots, but will take longer. This
- X parameter no longer has any effect on data-file plotting.
- X
- X Syntax:
- X set samples <expression>
- X show samples
- 3 size
- ?set size
- ?show size
- ?size
- X The `set size` command scales the displayed size of the plot. On some
- X terminals, changing the size of the plot will result in text being
- X misplaced. Increasing the size of the plot may produce strange
- X results. Decreasing is safer.
- X
- X Syntax:
- X
- X set size {<xscale>,<yscale>}
- X show size
- X
- X The <xscale> and <yscale> values are the scaling factors for the size.
- X The defaults (1,1) are selected if the scaling factors are omitted.
- X
- X Examples:
- X
- X To set the size to normal size use:
- X set size
- X To make the plot half size use:
- X set size 0.5,0.5
- X To show the size use:
- X show size
- X
- X For the LaTeX and Fig terminals the default size (scale factor 1,1)
- X is 5 inches wide by 3 inches high. The big Fig terminal (`bfig`) is 7
- X inches wide by 5 inches high. The postscript default is landscape mode
- X 10 inches wide and 7 inches high.
- X Note that the size of the plot includes the space used by the labels;
- X the plotting area itself is smaller.
- 3 style
- ?set style
- ?show style
- ?style
- X Plots may be displayed in one of six styles: `lines`, `points`,
- X `linespoints`, `impulses`, `dots`, or `errorbars`. The `lines` style
- X connects adjacent points with lines. The `points` style displays a
- X small symbol at each point. The `linespoints` style does both
- X `lines` and `points`. The `impulses` style displays a vertical line
- X from the x axis to each point. The `dots` style plots a tiny dot at
- X each data point; this is useful for scatter plots with many points.
- X
- X The `errorbars` style is relevant only for to data file `plot`s. It is
- X treated like `points` for function `plot`s and `splot`s. For data file
- X `plot`s, `errorbars` is like `points`, except that a vertical error
- X bar is also drawn: for each point (x,y), a line is drawn from (x,ylow)
- X to (x,yhigh). A tic mark is placed at the ends of the error bar. The
- X ylow and yhigh values are read from the data file's third and fourth
- X columns, or as specified with the `using` option to plot. See `plot
- X errorbars` for more information.
- X
- X Default styles are chosen with the `set function style` and `set
- X data style` commands. See `plot style` for information about how
- X to override the default plotting style for individual functions.
- X
- X Syntax:
- X set function style <style>
- X set data style <style>
- X show function style
- X show data style
- X
- X where <style> is `lines`, `points`, `linespoints`, `impulses`,
- X `dots`, or `errorbars`.
- 3 surface
- ?set surface
- ?set nosurface
- ?show surface
- ?surface
- X `set surface` controls the display of surfaces. It is useful if
- X contours are to be displayed by themselves. Whenever `set nosurface`
- X is issued, no surface isolines/mesh will be drawn. See also `set
- X contour`.
- X
- X Syntax:
- X set surface
- X set nosurface
- X show surface
- 3 terminal
- ?set terminal
- ?show terminal
- ?terminal
- X GNUPLOT supports many different graphics devices. Use the `set
- X terminal` command to select the type of device for which GNUPLOT
- X will produce output.
- X
- X Syntax:
- X set terminal {<terminal-type>}
- X show terminal
- X
- X If <terminal-type> is omitted, GNUPLOT will list the available
- X terminal types. <terminal-type> may be abbreviated.
- X
- X Use `set output` to redirect this output to a file or device.
- X
- X Several terminals have additional options. For example, see `dumb`,
- X `iris4d`, `hpljii` or `postscript`.
- 4 dumb
- ?set terminal dumb
- ?dumb
- X The dumb terminal driver has an optional size specification.
- X
- X Syntax:
- X set terminal dumb {<xsize> <ysize>}
- X
- X where <xsize> and <ysize> set the size of the dumb terminals. Default
- X is 79 by 24.
- X
- X Examples:
- X set term dumb
- X set term dumb 79 49 #(VGA screen - why would anyone want to do that!?)
- X
- 4 hpljii
- ?set terminal hpljii
- ?hpljii
- X The HP LaserJet II and HP DeskJet drivers have a single option.
- X
- X Syntax:
- X set terminal hpljii {<resolution>}
- X set terminal hpdj {<resolution>}
- X
- X where <resolution> is the resolution of the output in dots per inch.
- X It must be `75`, `100`, `150` or `300`.
- X
- X Example:
- X set terminal hpljii 150
- X
- 4 iris4d
- ?set terminal iris4d
- ?iris4d
- X The iris4d driver can operate in two modes.
- X
- X Syntax:
- X set terminal iris4d {24}
- X
- X If the hardware supports only 8 bits, use the default `set terminal
- X iris4d`. If, however, the hardware supports 24 bits (8 per
- X red/green/blue), use `set terminal iris4d 24`.
- X
- X When using 24-bit mode, the colors can be directly specified via the
- X file .gnuplot_iris4d that is searched in the current directory and
- X then in the home directory specified by the HOME environment variable.
- X This file holds RGB values for the background, border, labels and nine
- X plotting colors, in that order. For example, here is a file containing
- X the default colors:
- X
- X 85 85 85 /* Back Ground */
- X 0 0 0 /* Boundary */
- X 170 0 170 /* Labeling */
- X 85 255 255 /* Plot Color 1 */
- X 170 0 0 /* Plot Color 2 */
- X 0 170 0 /* Plot Color 3 */
- X 255 85 255 /* Plot Color 4 */
- X 255 255 85 /* Plot Color 5 */
- X 255 85 85 /* Plot Color 6 */
- X 85 255 85 /* Plot Color 7 */
- X 0 170 170 /* Plot Color 8 */
- X 170 170 0 /* Plot Color 9 */
- X
- X This file has exactly 12 lines of RGB triples. No empty lines are
- X allowed and anything after the third number in line is ignored.
- X
- 4 postscript
- ?set terminal postscript
- ?postscript
- X Several options may be set in the PostScript driver.
- X
- X Syntax:
- X set terminal postscript {<mode>} {<color>}
- X {"<fontname>"} {<fontsize>}
- X
- X where <mode> is `landscape`, `portrait` or `default`. Selecting default
- X sets all options to their defaults.
- X <color> is either `color` or `monochrome`.
- X "<fontname>" is the name of a valid PostScript font.
- X <fontsize> is the size of the font in PostScript points, before
- X scaling by the `set size` command.
- X Defaults are `landscape`, `monochrome`, "Courier", and 14pt.
- X Default size of PostScript plot is landscape mode 10 inches wide
- X and 7 inches high.
- X
- X Examples:
- X
- X set size 1,1
- X set term postscript default # old postscript
- X set term postscript landscape 22 # old psbig
- X set size 0.5,0.5
- X set term postscript portrait 14 # old epsf1
- X set term postscript portrait 22 # old epsf2
- X set size 1,1; set term post landscape color "Times-Roman" 14
- X
- 3 tics
- ?set tics
- ?show tics
- ?tics
- X By default, tics are drawn inwards from the border on all four sides.
- X The `set tics` command can be used to change the tics to be
- X drawn outwards on the left and bottom borders only.
- X This is useful when doing impulse plots.
- X
- X Syntax:
- X set tics {<direction>}
- X show tics
- X
- X where <direction> may be `in` or `out`. `set tics` defaults to `in`.
- X
- X See also the `set xtics`, `set ytics`, and `set ztics` command for more
- X control of tic marks.
- ?set ticslevel
- ?show ticslevel
- ?ticslevel
- X Using splot, in 3-d plots, one can adjust the relative height of the
- X vertical (Z) axis using `set ticslevel`. The numeric argument provided
- X specifies the location of the bottom of the scale. a zero will put it
- X on the bottom grid and any positive number somewhere along the z axis.
- X
- X Syntax:
- X set ticslevel {<level>}
- X show tics
- X
- X where <level> is a non negative numeric argument. For example,
- X
- X set ticslevel 0.5
- X
- X sets the tics level to the default value.
- X
- X See also the `set view`.
- 3 time
- ?set time
- ?show time
- ?time
- X The optional `set time` places the time and date of the plot either
- X at the top or bottom of the left margin. The exact location is
- X device dependent.
- X
- X Syntax:
- X set time {<xoff>}{,<yoff>}
- X set notime
- X show time
- X
- X Specifying constants <xoff> or <yoff> as optional offsets for the time
- X will move the time <xoff> or <yoff> character screen coordinates. For
- X example,
- X
- X set time ,-3
- X
- X will change only the y offset of the time, moving the title down by
- X roughly the height of three characters.
- X
- 3 title
- ?set title
- ?show title
- ?title
- X The `set title` command produces a plot title that is centered at the
- X top of the plot. Using the optional x,y screen offsets, the title
- X can be placed anywhere on the plot. `set title` with no parameters
- X clears the title.
- X
- X Syntax:
- X set title {"<title-text>"} {<xoff>}{,<yoff>}
- X show title
- X
- X Specifying constants <xoff> or <yoff> as optional offsets for the
- X title will move the title <xoff> or <yoff> character screen
- X coordinates. Note these are screen coordinates and not plot
- X coordinates. For example,
- X
- X set title ,-1
- X
- X will change only the y offset of the title, moving the title down by
- X roughly the height of one character.
- X
- X (The Latex, EEPIC, and Imagen drivers allow \\ in a string to specify
- X a newline.)
- 3 trange
- ?set trange
- ?show trange
- ?trange
- X The `set trange` command sets the parametric range used to compute
- X x and y values when in parametric mode. If not in parametric mode
- X (see `set parametric`) then this range is not used. This command
- X does not affect x/y autoscaling or x/y ranges.
- X
- X This range may also be specified on the `plot` command line when
- X in parametric mode.
- X
- X Syntax:
- X set trange [{<tmin> : <tmax>}]
- X
- X where <tmin> and <tmax> terms are constants or expressions.
- X
- X Both the <tmin> and <tmax> terms are optional. Anything omitted will
- X not be changed, so
- X set trange [:10]
- X changes tmax to 10 without affecting tmin. See also `set urange` and
- X `set parametric`.
- 3 urange
- ?set urange
- ?show urange
- ?urange
- X The `set urange` and `set vrange` commands sets the parametric ranges used
- X to compute x, y, and z values when in `splot` parametric mode. If not in
- X parametric mode (see `set parametric`) then these ranges are not used. This
- X command does not affect x/y autoscaling or x/y ranges.
- X
- X This range may also be specified on the `splot` command line when
- X in parametric mode. See `plot` for more information
- X
- X Syntax:
- X set urange [{<umin> : <umax>}]
- X
- X where <umin> and <umax> terms are constants or expressions.
- X
- X Both the <umin> and <umax> terms are optional. Anything omitted will
- X not be changed, so
- X set urange [:10]
- X changes umax to 10 without affecting umin. See also `set trange`.
- 3 variables
- ?show variables
- X The `show variables` command lists all user-defined variables and
- X their values.
- X
- X Syntax:
- X show variables
- 3 view
- ?set view
- ?show view
- ?view
- X The `set view` command sets the view point for `splot`s. This
- X command controls the way the 3-d coordinates of the plot are mapped
- X into the 2-d screen space. This command provides controls to both
- X rotation and scaling of the plotted data but supports orthographic
- X projections only.
- X
- X Syntax:
- X set view <rot_x> {,{<rot_z>}{,{<scale>}{,<scale_z>}}}
- X show view
- X
- X where <rot_x> and <rot_z> control the rotation angles (in degrees)
- X along a virtual 3-d coordinate system aligned with the screen such
- X that the screen horizontal axis is x, screen vertical axis is y, and
- X the axis perpendicular to the screen is z. <rot_x> is bounded to the
- X [0:180] range with a default of 60 degrees, while <rot_z> is bounded
- X to the [0:360] range with a default of 30 degrees. <scale> controls
- X the scaling of the entire `splot`, while <scale_z> scales the z axis
- X only. Both scales default to 1.0.
- X
- X Examples:
- X set view 60, 30, 1, 1
- X set view ,,0.5
- X
- X The first sets all the four default values. The second changes
- X only scale, to 0.5.
- X
- X See also `set ticslevel`.
- 3 vrange
- ?set vrange
- ?show vrange
- ?vrange
- X The `set vrange` command is similar to the `set urange` command.
- X Please see `set urange`.
- 3 xlabel
- ?set xlabel
- ?show xlabel
- ?xlabel
- X The `set xlabel` command sets the x-axis label that is centered along
- X the x axis. Using the optional x,y screen offsets, the label can be
- X placed anywhere on the plot. `set xlabel` with no parameters clears
- X the label.
- X
- X Syntax:
- X set xlabel {"<label>"} {<xoff>}{,<yoff>}
- X show xlabel
- X
- X Specifying constants <xoff> or <yoff> as optional offsets for the
- X label will move the label <xoff> or <yoff> character screen
- X coordinates. For example,
- X
- X set xlabel -1
- X
- X will change only the x offset of the xlabel, moving the label roughly
- X one character width to the left.
- X
- X (The LaTeX, EEPIC, and Imagen drivers allow \\ in a string to specify
- X a newline.)
- 3 xrange
- ?set xrange
- ?show xrange
- ?xrange
- X The `set xrange` command sets the horizontal range that will be
- X displayed. This command turns x axis autoscaling off.
- X
- X This range may also be specified on the `plot` command line.
- X
- X Syntax:
- X set xrange [{<xmin> : <xmax>}]
- X
- X where <xmin> and <xmax> terms are constants or expressions.
- X
- X Both the <xmin> and <xmax> terms are optional. Anything omitted will
- X not be changed, so
- X set xrange [:10]
- X changes xmax to 10 without affecting xmin.
- 3 xtics
- ?set xtics
- ?set noxtics
- ?show xtics
- ?xtics
- ?noxtics
- X Fine control of the x axis tic marks is possible with the
- X `set xtics` command. The x-axis tic marks may be turned off with the
- X `set noxtics` command. They may be turned on (the default state) with
- X `set xtics`.
- X
- X Syntax:
- X set xtics { {<start>, <incr>{, <end>}} |
- X {({"<label>"} <pos> {, {"<label>"} <pos>}...)} }
- X set noxtics
- X show xtics
- X
- X The <start>, <incr>, <end> form specifies that a series of tics will
- X be plotted on the x axis between the x values <start> and <end>
- X with an increment of <incr>. If <end> is not given it is assumed to be
- X infinity. The increment may be negative. For example,
- X set xtics 0,.5,10
- X makes tics at 0, 0.5, 1, 1.5, ..., 9.5, 10.
- X
- X The ("<label>" <pos>, ...) form allows arbitrary tic positions or
- X non-numeric tic labels. A set of tics are a set of positions, each
- X with its own optional label. Note that the label is a string enclosed
- X by quotes, and may be a constant string, such as "hello", or contain
- X formatting information for the tic number (which is the same as the
- X position), such as "%3f clients". See `set format` for more
- X information about this case. The label may even be empty.
- X Examples:
- X set xtics ("low" 0, "medium" 50, "high" 100)
- X set xtics (1,2,4,8,16,32,64,128,256,512,1024)
- X set xtics ("bottom" 0, "" 10, "top" 20)
- X
- X Tics will only be plotted when in range.
- X
- X The `set ytics` and `set noytics` commands work identically.
- X See also the `set format` command.
- 3 xzeroaxis
- ?set xzeroaxis
- ?set noxzeroaxis
- ?show xzeroaxis
- ?xzeroaxis
- ?noxzeroaxis
- X `set xzeroaxis` draws the x-axis. By default, this option is on.
- X `set noxzeroaxis` causes GNUPLOT to omit the x-axis.
- X
- X Syntax:
- X set xzeroaxis
- X set noxzeroaxis
- X show xzeroaxis
- 3 ylabel
- ?set ylabel
- ?show ylabel
- ?ylabel
- X The `set ylabel` command sets the y-axis label. The position of this
- X label depends on the terminal, and can be one of the following three
- X positions (the position can be adjusted with optional parameters).
- X
- X 1. Horizontal text flushed left at the top left of the plot.
- X Terminals that cannot rotate text will probably use this method.
- X
- X 2. Vertical text centered vertically at the left of the plot.
- X Terminals that can rotate text will probably use this method.
- X
- X 3. Horizontal text centered vertically at the left of the plot.
- X The LaTeX and EEPIC drivers use this method. The user must insert
- X line breaks using \\ to prevent the ylabel from overwriting
- X the plot. To produce a vertical row of characters, add \\
- X between every printing character (but this is ugly).
- X
- X Syntax:
- X set ylabel {"<label>"} {<xoff>}{,<yoff>}
- X show ylabel
- X
- X With no parameters, the label is cleared. Specifying constants <xoff>
- X or <yoff> as optional offsets for the label will move the label <xoff>
- X or <yoff> character screen coordinates. For example,
- X
- X set ylabel -1
- X
- X will change only the x offset of the ylabel, moving the label roughly
- X one character width left of its default position. This is especially
- X useful with the LaTeX driver.
- X
- X (The LaTeX, EEPIC, and Imagen drivers allow \\ in a string to specify
- X a newline.)
- 3 yrange
- ?set yrange
- ?show yrange
- ?yrange
- X The `set yrange` command sets the vertical range that will be
- X displayed. This command turns y axis autoscaling off.
- X
- X This range may also be specified on the `plot` command line.
- X
- X Syntax:
- X set yrange [{<ymin> : <ymax>}]
- X
- X where <ymin> and <ymax> terms are constants or expressions.
- X
- X Both the <ymin> and <ymax> terms are optional. Anything omitted will
- X not be changed, so
- X set yrange [:10]
- X changes ymax to 10 without affecting ymin.
- 3 ytics
- ?set ytics
- ?set noytics
- ?show ytics
- ?ytics
- ?noytics
- X The `set ytics` and `set noytics` commands are similar to the `set xtics`
- X and `set noxtics` commands. Please see `set xtics`.
- 3 yzeroaxis
- ?set yzeroaxis
- ?set noyzeroaxis
- ?show yzeroaxis
- ?yzeroaxis
- ?noyzeroaxis
- X `set yzeroaxis` draws the y-axis. By default, this option is on.
- X `set noyzeroaxis` causes GNUPLOT to omit the y-axis.
- X
- X Syntax:
- X set yzeroaxis
- X set noyzeroaxis
- X show yzeroaxis
- 3 zero
- ?set zero
- ?show zero
- ?zero
- X The `zero` value is the default threshold for values approaching 0.0.
- X GNUPLOT will not plot a point if its imaginary part is greater in
- X magnitude than the `zero` threshold. Axis ranges cannot be less than
- X `zero`. The default `zero` value is 1e-8. This can be changed with
- X the `set zero` command.
- X
- X Syntax:
- X set zero <expression>
- X show zero
- 3 zeroaxis
- ?set zeroaxis
- ?set nozeroaxis
- ?show zeroaxis
- ?zeroaxis
- SHAR_EOF
- true || echo 'restore of gnuplot/docs/gnuplot.doc failed'
- fi
- echo 'End of part 9'
- echo 'File gnuplot/docs/gnuplot.doc is continued in part 10'
- echo 10 > _shar_seq_.tmp
- exit 0
-
- exit 0 # Just in case...
- --
- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM
- Sterling Software, IMD UUCP: uunet!sparky!kent
- Phone: (402) 291-8300 FAX: (402) 291-4362
- Please send comp.sources.misc-related mail to kent@uunet.uu.net.
-