gnuplot documentation
gnuplot documentation
gnuplot documentation
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
70 SET-SHOW <strong>gnuplot</strong> 4.3 121<br />
splot x*x+y*y<br />
There used to be an option {transparent|solid} to this command. Now you get the same effect from set<br />
grid {front|layerdefault}, respectively.<br />
The set pm3d map is an abbreviation for set pm3d at b; set view map; set style data pm3d;<br />
set style func pm3d;. It is used for backwards compatibility, when set view map was not available.<br />
Take care that you properly use zrange and cbrange for input data point filtering and color range<br />
scaling, respectively; and also set (no)surface seems to have a (side?) effect.<br />
The option interpolate will interpolate grid points into a finer mesh, and color each quadrangle appropriately.<br />
For data files, this will smoothen the color surface, and enhance spikes in a color surface. For<br />
functions, interpolation makes little sense, except to trade off precision for memory. It would usually<br />
make more sense to use samples and isosamples when working with functions.<br />
The coloring setup as well as the color box drawing are determined by set palette. There can be only<br />
one palette for the current plot. Drawing of several surfaces with different palettes can be achieved by<br />
multiplot with fixed origin and size; don’t forget to use set palette maxcolors when your terminal<br />
is running out of available colors.<br />
On <strong>gnuplot</strong> start-up, mode is explicit. For historical and thus compatibility reasons, commands set<br />
pm3d; (i.e. no options) and set pm3d at X ... (i.e. at is the first option) sets mode implicit. Further,<br />
set pm3d; sets up the other options to their default.<br />
If the option implicit is on, all surface plots will be plotted additionally to the default type, e.g.<br />
splot ’fred.dat’ with lines, ’lola.dat’ with lines<br />
would give both plots (meshes) additionally to a pm3d surface. That’s what you are used to after set<br />
pm3d;.<br />
If the option explicit is on (or implicit is off) only plots specified by the with pm3d attribute are<br />
plotted with a pm3d surface, e.g.:<br />
splot ’fred.dat’ with lines, ’lola.dat’ with pm3d<br />
would plot ’fred.dat’ with lines (and only lines) and ’lola.dat’ with a pm3d surface.<br />
If you set the default data or function style to pm3d, e.g.:<br />
set style data pm3d<br />
then the options implicit and explicit have no effect.<br />
Note that when plotting several plots, they are plotted in the order given on the command line. This can<br />
be of interest especially for filled surfaces which can overwrite and therefore hide part of earlier plots.<br />
If with pm3d is specified in the splot command line, then it accepts the ’at’ option. The following<br />
plots draw three color surfaces at different altitudes:<br />
set border 4095<br />
set pm3d at s<br />
splot 10*x with pm3d at b, x*x-y*y, x*x+y*y with pm3d at t<br />
See also help for set palette (p. 122), set cbrange (p. 149), set colorbox (p. 93), x11 pm3d<br />
(p. 204) and definitely the demo file demo/pm3d.dem.<br />
70.49.1 Depthorder<br />
By default the quadrangles making up a pm3d solid surface are rendered in the order they<br />
are encountered along the surface grid points. This order may be controlled by the options<br />
scansautomatic|scansforward|scansbackward. These scan options are not in general compatible<br />
with hidden-surface removal.<br />
Gnuplot does not do true hidden surface removal for solid surfaces, but often it is sufficient to render the<br />
component quadrangles in order from furthest to closest. This mode may be selected using the options<br />
set pm3d depthorder hidden3d<br />
The depthorder option orders the solid quadrangles; the hidden3d option similarly orders the bounding<br />
lines (if drawn). Note that the global option set hidden3d does not affect pm3d surfaces.