In many applications the data is better described in polar or
cylindrical (,
r) coordinates rather than
the usual Cartesian coordinates (x, y). The
relationship between the Cartesian and polar coordinates are
described by
.
The polar transformation is simply defined by providing
scale in inches/unit (-Jp) or full width
of plot in inches (-JP).
Optionally, append /origin in degrees to indicate an angular
offset [0].
As an example of this projection we will create a gridded data set
in polar coordinates
using grdmath , a RPN calculator that operates on or
creates grdfiles.
grdmath -R0/360/2/4 -I6/0.1 X 4 MUL PI MUL 180 DIV COS Y 2 POW MUL = test.grd grdcontour test.grd -JP3i -B30Ns -P -C2 -S4 >! GMT_polar.ps
We used grdcontour to make a contour map of this data. Because
the data file only contains values with
,
a donut
shaped plot appears in Figure 5.5.