Style

Functions and data may be displayed in one of a large number of styles. The with keyword provides the means of selection.

Syntax:

        with <style> {<linetype> {<pointtype>}}

where <style> is either lines, points, linespoints, impulses, dots, steps, fsteps, errorbars, xerrorbars, yerrorbars, xyerrorbars, boxes, boxerrorbars, boxxyerrorbars, splines, csplines, bezier, sbezier, or vector. A given style may not be appropriate for both 2-D and 3-D plots and may require additional information. See set style <style> for details about each style.

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. The PostScript drivers (postscript) supplies a total of sixty-four.

If you wish to choose the line or point type, <linetype> and <pointtype> may be specified. These are positive integer constants (or expressions) that specify the line type and point type to be used for the plot.

Use test to display the types available for your terminal.

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 the data file 'population' with boxes:

        plot "population" with boxes

This plots ``exper.dat'' with errorbars and lines connecting the points:

        plot 'exper.dat' w lines, 'exper.dat' w errorbars

Here 'exper.dat' should have three or four data columns.

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 when specifying 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.

See set style to change the default styles.