next up previous contents index
Next: Start-up Up: Gnuplot Previous: Mouse variables   Contents   Index


Plotting

There are three gnuplot commands which actually create a plot: plot, splot and replot. plot generates 2-d plots, splot generates 3-d plots (actually 2-d projections, of course), and replot appends its arguments to the previous plot or splot and executes the modified command.

Much of the general information about plotting can be found in the discussion of plot; information specific to 3-d can be found in the splot section.

plot operates in either rectangular or polar coordinates - see set polar (p. [*]) for details of the latter. splot operates only in rectangular coordinates, but the set mapping command allows for a few other coordinate systems to be treated. In addition, the using option allows both plot and splot to treat almost any coordinate system you'd care to define.

plot also lets you use each of the four borders - x (bottom), x2 (top), y (left) and y2 (right) - as an independent axis. The axes option lets you choose which pair of axes a given function or data set is plotted against. A full complement of set commands exists to give you complete control over the scales and labelling of each axis. Some commands have the name of an axis built into their names, such as set xlabel. Other commands have one or more axis names as options, such as set logscale xy. Commands and options controlling the z axis have no effect on 2-d graphs.

splot can plot surfaces and contours in addition to points and/or lines. In addition to splot, see set isosamples (p. [*]) for information about defining the grid for a 3-d function; splot datafile (p. [*]) for information about the requisite file structure for 3-d data values; and set contour (p. [*]) and set cntrparam (p. [*]) for information about contours.

In splot, control over the scales and labels of the axes are the same as with plot, except that commands and options controlling the x2 and y2 axes have no effect whereas of course those controlling the z axis do take effect.


next up previous contents index
Next: Start-up Up: Gnuplot Previous: Mouse variables   Contents   Index
Ethan Merritt 2007-03-03