14.10.2014 Views

gnuplot documentation

gnuplot documentation

gnuplot documentation

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.

120 <strong>gnuplot</strong> 4.3 70 SET-SHOW<br />

unset pm3d<br />

Color surface is drawn if data or function style is set to pm3d globally or via ’with’ option, or if the<br />

option implicit is on — then the pm3d surface is combined with the line surface mesh. See bottom of<br />

this section for mode details.<br />

Color surface can be drawn at the base or top (then it is a gray/color planar map) or at z-coordinates of<br />

surface points (gray/color surface). This is defined by the at option with a string of up to 6 combinations<br />

of b, t and s. For instance, at b plots at bottom only, at st plots firstly surface and then top map,<br />

while at bstbst will never by seriously used.<br />

Colored quadrangles are plotted one after another. When plotting surfaces (at s), the later quadrangles<br />

overlap (overdraw) the previous ones. (Gnuplot is not virtual reality tool to calculate intersections of<br />

filled polygon meshes.) You may try to switch between scansforward and scansbackward to force<br />

the first scan of the data to be plotted first or last. The default is scansautomatic where <strong>gnuplot</strong><br />

makes a guess about scans order. On the other hand, the depthorder option completely reorders the<br />

qudrangles. The rendering is performed after a depth sorting, which allows to visualize even complicated<br />

surfaces; see help pm3d depthorder (p. ??) for more details.<br />

If two subsequent scans do not have same number of points, then it has to be decided whether to<br />

start taking points for quadrangles from the beginning of both scans (flush begin), from their ends<br />

(flush end) or to center them (flush center). Note, that flush (center|end) are incompatible with<br />

scansautomatic: if you specify flush center or flush end and scansautomatic is set, it is silently<br />

switched to scansforward.<br />

If two subsequent scans do not have the same number of points, the option ftriangles specifies whether<br />

color triangles are drawn at the scan tail(s) where there are not enough points in either of the scan. This<br />

can be used to draw a smooth map boundary.<br />

Clipping with respect to x, y coordinates of quadrangles can be done in two ways. clip1in: all 4 points<br />

of each quadrangle must be defined and at least 1 point of the quadrangle must lie in the x and y ranges.<br />

clip4in: all 4 points of each quadrangle must lie in the x and y ranges.<br />

There is a single gray/color value associated to each drawn pm3d quadrangle (no smooth color change<br />

among vertices). The value is calculated from z-coordinates from the surrounding corners according to<br />

corners2color . The options ’mean’ (default), ’geomean’ and ’median’ produce various kinds<br />

of surface color smoothing, while options ’min’ and ’max’ choose minimal or maximal value, respectively.<br />

This may not be desired for pixel images or for maps with sharp and intense peaks, in which case the<br />

options ’c1’, ’c2’, ’c3’ or ’c4’ can be used instead to assign the quadrangle color based on the z-coordinate<br />

of only one corner. Some experimentation may be needed to determine which corner corresponds to ’c1’,<br />

as the orientation depends on the drawing direction. Because the pm3d algorithm does not extend the<br />

colored surface outside the range of the input data points, the ’c’ coloring options will result in pixels<br />

along two edges of the grid not contributing to the color of any quadrangle. For example, applying the<br />

pm3d algorithm to the 4x4 grid of data points in script demo/pm3d.dem (please have a look) produces<br />

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. This is already done for drawing images (2D grids) via image and rgbimage styles.<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. 139) and set colorbox (p. 93).<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

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

Saved successfully!

Ooh no, something went wrong!