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 119<br />
Files:<br />
PostScript<br />
pslatex, pstex, epslatex<br />
gif, png, jpeg<br />
(x)fig<br />
tgif<br />
cgm<br />
pdf<br />
svg<br />
emf<br />
Let us first describe how a map/surface is drawn. The input data come from an evaluated function or<br />
from an splot data file. Each surface consists of a sequence of separate scans (isolines). The pm3d<br />
algorithm fills the region between two neighbouring points in one scan with another two points in the<br />
next scan by a gray (or color) according to z-values (or according to an additional ’color’ column, see<br />
help for using (p. 74)) of these 4 corners; by default the 4 corner values are averaged, but this can<br />
be changed by the option corners2color. In order to get a reasonable surface, the neighbouring scans<br />
should not cross and the number of points in the neighbouring scans should not differ too much; of<br />
course, the best plot is with scans having same number of points. There are no other requirements (e.g.<br />
the data need not be gridded). Another advantage is that the pm3d algorithm does not draw anything<br />
outside of the input (measured or calculated) region.<br />
Surface coloring works with the following input data:<br />
1. splot of function or of data file with one or three data columns: The gray/color scale is obtained<br />
by mapping the averaged (or corners2color) z-coordinate of the four corners of the above-specified<br />
quadrangle into the range [min color z,max color z] of zrange or cbrange providing a gray value in the<br />
range [0:1]. This value can be used directly as the gray for gray maps. The normalized gray value can<br />
be further mapped into a color — see set palette (p. 122) for the complete description.<br />
2. splot of data file with two or four data columns: The gray/color value is obtained by using the<br />
last-column coordinate instead of the z-value, thus allowing the color and the z-coordinate be mutually<br />
independent. This can be used for 4d data drawing.<br />
Other notes:<br />
1. The term ’scan’ referenced above is used more among physicists than the term ’iso curve’ referenced<br />
in <strong>gnuplot</strong> <strong>documentation</strong> and sources. You measure maps recorded one scan after another scan, that’s<br />
why.<br />
2. The ’gray’ or ’color’ scale is a linear mapping of a continuous variable onto a smoothly varying palette<br />
of colors. The mapping is shown in a rectangle next to the main plot. This <strong>documentation</strong> refers to this<br />
as a "colorbox", and refers to the indexing variable as lying on the colorbox axis. See set colorbox<br />
(p. 93), set cbrange (p. 149).<br />
3. To use pm3d coloring to generate a two-dimensional plot rather than a 3D surface, use set view<br />
map or set pm3d map.<br />
Syntax (the options can be given in any order):<br />
set pm3d {<br />
}<br />
show pm3d<br />
{ at }<br />
{ interpolate , }<br />
{ scansautomatic | scansforward | scansbackward | depthorder }<br />
{ flush { begin | center | end } }<br />
{ ftriangles | noftriangles }<br />
{ clip1in | clip4in }<br />
{ corners2color { mean|geomean|median|min|max|c1|c2|c3|c4 } }<br />
{ hidden3d | nohidden3d }<br />
{ implicit | explicit }<br />
{ map }