next up previous contents index
Next: Geographic basemaps Up: 4.4 Standardized command line Previous: 4.4.2 Coordinate Transformations and   Contents   Index

4.4.3 Map frame and axes annotations: The -B option

This is by far the most complicated option in GMT, but most examples of its usage are actually quite simple. Given as -B[p$\vert$s]xinfo[/yinfo[/zinfo]][:."title string":][W$\vert$w][E$\vert$e][S$\vert$s][N$\vert$n][Z$\vert$z[+]], this switch specifies map boundaries (or plot axes) to be plotted by using the selected information. The optional flag following -B selects p(rimary) [Default] or s(econdary) axes information (mostly used for time axes annotations; see examples below). The components xinfo, yinfo and zinfo are of the form

info[:"axis label":][:="prefix":][:,"unit label":]

where info is one or more concatenated substrings of the form [t]stride[$\pm$phase][u]. The t flag sets the axis item of interest; the available items are listed in Table 4.2. By default, all 4 map boundaries (or plot axes) are plotted (denoted W, E, S, N). To change this selection, append the codes for those you want (e.g., WSn). Upper case (e.g., W) will annotate in addition to draw axis/tick-marks. The title, if given, will appear centered above the plot4.6. Unit label or prefix may start with a leading - to suppress the space between it and the annotation. Normally, equidistant annotations occur at multiples of stride; you can phase-shift this by appending $\pm$phase.

Table 4.2: Interval type codes.
Flag Description
a Annotation tick spacing
f Frame tick spacing
g Grid tick spacing

Note that the appearance of certain time annotations (month-, week-, and day-names) may be affected by the TIME_LANGUAGE, TIME_FORMAT_PRIMARY, and TIME_FORMAT_SECONDARY settings.

The unit flag u can take on one of 18 codes; these are listed in Table 4.3. Almost all of these units are time-axis specific. However, the m and c units will be interpreted as arc minutes and arc seconds, respectively, when a map projection is in effect.

Table 4.3: Interval unit codes.
Flag Unit Description
Y year Plot using all 4 digits
y year Plot using last 2 digits
O month Format annotation using PLOT_DATE_FORMAT
o month Plot as 2-digit integer (1-12)
U ISO week Format annotation using PLOT_DATE_FORMAT
u ISO week Plot as 2-digit integer (1-53)
r Gregorian week 7-day stride from start of week (TIME_WEEK_START)
K ISO weekday Plot name of weekday in selected language
k weekday Plot number of day in the week (1-7) see TIME_WEEK_START
D date Format annotation using PLOT_DATE_FORMAT
d day Plot day of month (1-31) or day of year (1-366) see PLOT_DATE_FORMAT
R day Same as d; annotations aligned with week (TIME_WEEK_START)
H hour Format annotation using PLOT_CLOCK_FORMAT
h hour Plot as 2-digit integer (0-24)
M minute Format annotation using PLOT_CLOCK_FORMAT
m minute Plot as 2-digit integer (0-60)
C seconds Format annotation using PLOT_CLOCK_FORMAT
c seconds Plot as 2-digit integer (0-60)

There may be two levels of annotations. Here, ``primary'' refers to the annotation that is closest to the axis (this is the primary annotation), while ``secondary'' refers to the secondary annotation that is plotted further from the axis. The examples below will clarify what is meant. Note that the terms ``primary'' and ``secondary'' do not reflect any hierarchical order of units: The ``primary'' annotation interval is smaller (e.g., days) while the ``secondary'' annotation interval typically is larger (e.g., months).

next up previous contents index
Next: Geographic basemaps Up: 4.4 Standardized command line Previous: 4.4.2 Coordinate Transformations and   Contents   Index
Paul Wessel 2006-01-01