01.02.2014 Views

GNUPlot Manual

GNUPlot Manual

GNUPlot Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

84 gnuplot 4.0 36 SET-SHOW<br />

quadrangle color based on the z-coordinate of only one corner. Some experimentation may be needed<br />

to determine which corner corresponds to ’c1’, as the orientation depends on the drawing direction.<br />

Because the pm3d algorithm does not extend the colored surface outside the range of the input data<br />

points, the ’c’ coloring options will result in pixels along two edges of the grid not contributing to<br />

the color of any quadrangle. For example, applying the pm3d algorithm to the 4x4 grid of data points<br />

in script demo/pm3d.dem (please have a look) produces only (4-1)x(4-1)=9 colored rectangles.<br />

Another drawing algorithm, which would draw quadrangles around a given node by taking corners from<br />

averaged (x,y)-coordinates of its surrounding 4 nodes while using node’s color, could be implemented in<br />

the future.<br />

Notice that ranges of z-values and color-values for surfaces are adjustable independently by set zrange,<br />

set cbrange, as well as set log for z or cb. Maps can be adjusted by the cb-axis only; see also set<br />

view map (p. 145) and set colorbox (p. 60).<br />

The option hidden3d takes as the argument a linestyle which must be created by set style line ....<br />

(The style need not to be present when setting pm3d, but it must be present when plotting). If set, lines<br />

are drawn using the specified line style, taking into account hidden line removal. This is by far more<br />

efficient than using the command set hidden3d as it doesn’t really calculate hidden line removal, but<br />

just draws the filled polygons in the correct order. So the recommended choice when using pm3d is<br />

set pm3d at s hidden3d 100<br />

set style line 100 lt 5 lw 0.5<br />

unset hidden3d<br />

unset surf<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 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 />

If the option implicit is on (which is the default), all surface plots will be plotted additionally to the<br />

default type, e.g.<br />

splot ’fred.dat’ with lines, ’lola.dat’ with lines<br />

would give both plots additionally to a pm3d surface. If the option implicit is off (or explicit is on)<br />

only plots specified by the with pm3d attribute are 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. If explicit is on,<br />

you can also switch to the default style pm3d, e.g.:<br />

set style data pm3d<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. 85), set cbrange (p. 154), set colorbox (p. 60), x11 pm3d<br />

(p. 141) and definitely the demo file demo/pm3d.dem.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!