Mapping

If data are provided to splot in spherical or cylindrical co-ordinates, the set mapping command should be used to instruct gnuplot how to interpret them.

Syntax:

        set mapping { cartesian | spherical | cylindrical }

For a spherical co-ordinate system, the data occupy two or three columns. The first two are interpreted as the polar and azimuthal angles theta and phi (in the units specified by set angles). The radius r is taken from the third column if there is one, or is set to unity if there is no third column. The mapping is:

        x = r * cos( theta ) * cos( phi )
        y = r * sin( theta ) * cos( phi )
        z = r * sin( phi )

For a cylindrical co-ordinate system, the data again occupy two or three columns. The first two are interpreted as theta (in the units specified by set angles) and z. The radius is either taken from the third column or set to unity, as in the spherical case. The mapping is:

        x = r * cos( theta )
        y = r * sin( theta )
        z = z

The effects of mapping can be duplicated with the using filter on the splot command, but mapping may be more convenient if many data files are to be processed.

mapping has no affect on data file plots.