A pen in GMT has three attributes: width, color,
and texture. Most programs will accept pen attributes in
the form of an option argument, with commas separating the
given attributes, e.g.,
-W[width[cipm]],[color],[texture[cipm]]
Width is by default measured in units of the
current device resolution (i.e., the value assigned to the parameter
DOTS_PR_INCH in your .gmtdefaults4 file). Thus, if the
dpi is set to 300 this unit is 1/300th of an inch. Append c,
i, p, or m to specify pen width in cm, inch, points
(1/72 of an inch), or meters, respectively.
Note that a pen thickness of 5 will be of different physical width
depending on your dpi setting, whereas a thickness of 5p will
always be 5/72 of an inch. Minimum-thickness pens can be achieved by
giving zero width, but the result is device-dependent. Finally, a few
predefined pen names can be used: default, faint, and {thin, thick, fat}[erest].
Table 4.4 shows this list and the corresponding pen widths.
The color can be specified in five different ways:
Gray. Specify a gray shade in the range 0-255 (linearly going from black [0] to white [255]).
RGB. Specify r/g/b, each ranging from 0-255. Here 0/0/0 is black, 255/255/255 is white,
255/0/0 is red, etc.
HSV. Specify hue-saturation-value, with the former in the 0-360 degree range while the latter
two take on the range 0-14.10.
CMYK. Specify cyan/magenta/yellow/black, each ranging from 0-100%.
Name. Specify one of 663 valid color names as defined in the X11 color table4.11.
A very small yet versatile subset consists of the 29 choices white, black, and [lightdark]{red,
orange, yellow, green, cyan, blue, magenta, graygrey, brown}.
The texture attribute controls the appearance
of the line. ``.'' yieds a dotted line, while a dashed pen is requested with ``-''.
The lengths of dots and dashes are scaled relative to the pen width (dots has
a length that equals the pen width while dashes are 8 times as long; gaps between
segments are 4 times the pen width).
For more detailed attributes including exact dimensions you may specify string:offset,
where string is a series of numbers separated by underscores.
These numbers represent a pattern by indicating the length of line
segments and the gap between segments. The offset phase-shifts the
pattern from the beginning the line. For example, if you want a yellow line of width
0.1 cm that alternates between long dashes (4 points), an 8 point gap, then
a 5 point dash, then another 8 point gap, with pattern offset by 2 points
from the origin, specify -W0.1c,yellow,4_8_5_8:2p.
In general, the texture units can be specified in dpi units, cm, inch, points,
or meters (see width discussion above).
Table 4.5 contains additional examples of pen specifications suitable for, say, psxy.