Next: 4.14 Specifying area fill Up: 4. General features Previous: 4.12 Overlay and Continue Contents Index

# 4.13 Specifying pen attributes

A pen in GMT has three attributes: width, color, and texture. Most programs will accept pen attributes in the form of an option argument, e.g.,

-W width[/color][t texture][p]

  Width is normally measured in units of the current device resolution (i.e., the value assigned to the parameter DOTS_PR_INCH in your .gmtdefaults file). Thus, if the dpi is set to 300 this unit is 1/300th of an inch. Append p to specify pen width in points (1/72 of an inch)4.2. 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.

  The color can be specified as a gray shade in the range 0-255 (linearly going from black to white) or using the RGB system where you specify r/g/b, each ranging from 0-255. Here 0/0/0 is black and 255/255/255 is white.

  The texture attribute controls the appearance of the line. To get a dotted line, simply append ``to'' after the width and color arguments; a dashed pen is requested with ``ta''. For exact specifications you may append t string:offset, where string is a series of integers separated by underscores. These numbers represent a pattern by indicating the length of line segments and the gap between segments. The offset shifts the pattern along the line. For example, if you want a yellow line of width 2 that alternates between long dashes (20 units), a 10 unit gap, then a 5 unit dash, then another 10 unit gap, with pattern offset by 10 units from the origin, specify -W2/255/255/0t20_10_5_10:10. Here, the texture units can be specified in dpi units or points (see above).

Next: 4.14 Specifying area fill Up: 4. General features Previous: 4.12 Overlay and Continue Contents Index