manpagez: man pages & more
info gnuplot
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.25.38 mapping

If data are provided to ‘splot‘ in spherical or cylindrical coordinates, the mapping command should be used to instruct ‘gnuplot‘ how to interpret them.


      set mapping {cartesian | spherical | cylindrical}

A cartesian coordinate system is used by default.

For a spherical coordinate system, the data occupy two or three columns (or using entries). The first two are interpreted as the azimuthal and polar angles theta and phi (or "longitude" and "latitude"), in the units specified by 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)

Note that this is a "geographic" spherical system, rather than a "polar" one (that is, phi is measured from the equator, rather than the pole).

For a cylindrical coordinate system, the data again occupy two or three columns. The first two are interpreted as theta (in the units specified by 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. However even if mapping is used, using may still be necessary if the data in the file are not in the required order.

mapping has no effect on ‘plot‘. world.dem: mapping demos.

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on February 28, 2014 using texi2html 5.0.

© 2000-2019
Individual documents may contain additional copyright information.