Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
pmi432 / LR02 / Books / gnuplot 4.6 manual.pdf
Скачиваний:
61
Добавлен:
18.03.2015
Размер:
2.22 Mб
Скачать

gnuplot 4.6

125

Mapping

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

Syntax:

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 rst two are interpreted as the azimuthal and polar angles theta and phi (or "longitude" and "latitude"), in the units speci ed 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)

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 rst two are interpreted as theta (in the units speci ed 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 e ects of mapping can be duplicated with the using lter on the splot command, but mapping may be more convenient if many data les are to be processed. However even if mapping is used, using may still be necessary if the data in the le are not in the required order.

mapping has no e ect on plot.

world.dem: mapping demos.

Margin

The margin is the distance between the plot border and the outer edge of the canvas. The size of the margin is chosen automatically, but can be overridden by the set margin commands. show margin shows the current settings. To alter the distance between the inside of the plot border and the data in the plot itself, see set o sets (p. 132).

Syntax:

set bmargin {{at screen} <margin>} set lmargin {{at screen} <margin>} set rmargin {{at screen} <margin>} set tmargin {{at screen} <margin>} show margin

The default units of <margin> are character heights or widths, as appropriate. A positive value de nes the absolute size of the margin. A negative value (or none) causes gnuplot to revert to the computed value. For 3D plots, only the left margin can be set using character units.

The keywords at screen indicates that the margin is speci ed as a fraction of the full drawing area. This can be used to precisely line up the corners of individual 2D and 3D graphs in a multiplot. This placement ignores the current values of set origin and set size, and is intended as an alternative method for positioning graphs within a multiplot.

Normally the margins of a plot are automatically calculated based on tics, tic labels, axis labels, the plot title, the timestamp and the size of the key if it is outside the borders. If, however, tics are attached to the axes (set xtics axis, for example), neither the tics themselves nor their labels will be included in either the margin calculation or the calculation of the positions of other text to be written in the margin. This can lead to tic labels overwriting other text if the axis is very close to the border.

Соседние файлы в папке Books