-
Book Overview & Buying
-
Table Of Contents
gnuplot Cookbook
By :
It is possible, when making 3D plots from data files, for the data to be interpreted in spherical or cylindrical coordinates rather than the default Cartesian system. For details, type help set mapping. We will give an example of using the cylindrical mapping to conveniently draw a shape with cylindrical symmetry.

The previous figure is a perspective view of a surface that somewhat resembles a Christmas tree ornament. The relevant feature of this surface is that it has rotational symmetry around the z (vertical) axis, which means that it is most naturally expressed in cylindrical coordinates.
Try the following script:
set mapping cylindrical
unset tics
unset border
set hidden
set xrange [-pi : pi]
set yrange [-pi : pi]
set zrange [0 : pi]
set iso 60
unset key
splot '++' using 1:2:(sin($2)) with linesThere are several new ideas used in this recipe. Breaking it down, these are:
The first, highlighted line contains the...
Change the font size
Change margin width
Change background colour