1PSSCALE(1) GMT PSSCALE(1)
2
3
4
6 psscale - Plot a gray or color scale-bar on maps
7
9 psscale -Drefpoint [ -B[p|s]parameters ] [ -Ccpt ] [ -Fbox ] [
10 -Gzlo/zhi ] [ -I[max_intens|low_i/high_i] ] [ -Jparameters ] [
11 -Jz|Zparameters ] [ -K ] [ -L[i][gap] ] [ -M ] [ -N[p|dpi ]] [ -O
12 ] [ -P ] [ -Q ] [ -Rregion ] [ -S ] [ -U[stamp] ] [ -V[level] ] [
13 -Wscale ] [ -Xx_offset ] [ -Yy_offset ] [ -Zzfile ] [ -pflags ] [
14 -ttransp ]
15
16 Note: No space is allowed between the option flag and the associated
17 arguments.
18
20 psscale plots gray scales or color scales on maps. Both horizontal and
21 vertical scales are supported. For CPTs with gradational colors (i.e.,
22 the lower and upper boundary of an interval have different colors) pss‐
23 cale will interpolate to give a continuous scale. Variations in inten‐
24 sity due to shading/illumination may be displayed by setting the option
25 -I. Colors may be spaced according to a linear scale, all be equal
26 size, or by providing a file with individual tile widths. The font used
27 for the annotations along the scale and optional units is specified by
28 FONT_ANNOT_PRIMARY. If a label is requested, it is plotted with
29 FONT_LABEL.
30
32 -D[g|j|J|n|x]refpoint[+wlength[/width]][+e[b|f][length]][+h|v][+jjus‐
33 tify][+m[a|c|l|u]][+n[txt]][+odx[/dy]]
34 Defines the reference point on the map for the color scale using
35 one of four coordinate systems: (1) Use -Dg for map (user) coor‐
36 dinates, (2) use -Dj or -DJ for setting refpoint via a 2-char
37 justification code that refers to the (invisible) map domain
38 rectangle, (3) use -Dn for normalized (0-1) coordinates, or (4)
39 use -Dx for plot coordinates (inches, cm, etc.). All but -Dx
40 requires both -R and -J to be specified. For -Dj or -DJ with
41 codes TC, BC, ML, MR (i.e., centered on one of the map sides) we
42 pre-calculate all further settings. Specifically, the length is
43 set to 80% of the map side, horizontal or vertical depends on
44 the side, the offset is MAP_LABEL_OFFSET for Dj with an extra
45 offset MAP_FRAME_WIDTH for DJ, and annotations are placed on the
46 side of the scale facing away from the map frame. However, you
47 can override any of these with these modifiers: Append +w fol‐
48 lowed by the length and width of the color bar. If width is not
49 specified then it is set to 4% of the given length. Give a neg‐
50 ative length to reverse the scale bar. Append +h to get a hori‐
51 zontal scale [Default is vertical (+v)]. By default, the anchor
52 point on the scale is assumed to be the bottom left corner (BL),
53 but this can be changed by appending +j followed by a 2-char
54 justification code justify (see pstext). Note: If -Dj is used
55 then justify defaults to the same as refpoint, if -DJ is used
56 then justify defaults to the mirror opposite of refpoint.
57 Finally, add +o to offset the color scale by dx/dy away from the
58 refpoint point in the direction implied by justify (or the
59 direction implied by -Dj or -DJ). Add sidebar triangles for
60 back- and/or foreground colors with +e. Append f (foreground) or
61 b (background) for only one sidebar triangle [Default gives
62 both]. Optionally, append triangle height [Default is half the
63 barwidth]. Move text to opposite side with +m[a|c|l|u]. Hori‐
64 zontal scale bars: Move annotations and labels above the scale
65 bar [Default is below]; the unit remains on the left. Vertical
66 scale bars: Move annotations and labels to the left of the scale
67 bar [Default is to the right]; the unit remains below. Append
68 one or more of a, l or u to control which of the annotations,
69 label, and unit that will be moved to the opposite side. Append
70 c if you want to print a vertical label as a column of charac‐
71 ters (does not work with special characters). Append +n to plot
72 a rectangle with the NaN color at the start of the bar, append
73 text to change label from NaN.
74
76 -B[p|s]parameters
77 Set annotation, tick, and gridline interval for the colorbar.
78 The x-axis label will plot beneath a horizontal bar (or verti‐
79 cally to the right of a vertical bar), except when using the +m
80 modifier in the -D option. As an option, use the y-axis label to
81 plot the data unit to the right of a horizontal bar (and above a
82 vertical bar). When using -Ba or -Baf annotation and/or minor
83 tick intervals are chosen automatically. If -B is omitted, or no
84 annotation intervals are provided, the default is to annotate
85 every color level based on the numerical entries in the CPT
86 (which may be overridden by ULB flags in the CPT). To specify
87 custom text annotations for intervals, you must append ;annota‐
88 tion to each z-slice in the CPT.
89
90 -Ccpt cpt is the CPT to be used. By default all color changes are
91 annotated. To use a subset, add an extra column to the CPT with
92 a L, U, or B to annotate Lower, Upper, or Both color segment
93 boundaries (but see -B). If not given, psscale will read stdin.
94 Like grdview, psscale can understand pattern specifications in
95 the CPT. For CPTs where the z range is in meters, it may be use‐
96 ful to change to another unit when plotting. To do so, append
97 +Uunit to the file name. Likewise, if the CPT uses another unit
98 than meter and you wish to plot the CPT versus meters, append
99 +uunit. If a GMT master dynamic CPT is given instead then its
100 z-range will be set to its default range (if it has one) before
101 plotting.
102
103 -F[+cclear‐
104 ances][+gfill][+i[[gap/]pen]][+p[pen]][+r[radius]][+s[[dx/dy/][shade]]]
105 Without further options, draws a rectangular border around the
106 scale using MAP_FRAME_PEN; specify a different pen with +ppen.
107 Add +gfill to fill the scale box [no fill]. Append +cclearance
108 where clearance is either gap, xgap/ygap, or lgap/rgap/bgap/tgap
109 where these items are uniform, separate in x- and y-direction,
110 or individual side spacings between scale and border. Append +i
111 to draw a secondary, inner border as well. We use a uniform gap
112 between borders of 2p and the MAP_DEFAULTS_PEN unless other val‐
113 ues are specified. Append +r to draw rounded rectangular borders
114 instead, with a 6p corner radius. You can override this radius
115 by appending another value. Finally, append +s to draw an offset
116 background shaded region. Here, dx/dy indicates the shift rela‐
117 tive to the foreground frame [4p/-4p] and shade sets the fill
118 style to use for shading [gray50].
119
120 -Gzlo/zhi
121 Truncate the incoming CPT so that the lowest and highest z-lev‐
122 els are to zlo and zhi. If one of these equal NaN then we leave
123 that end of the CPT alone. The truncation takes place before
124 the plotting.
125
126 -I[max_intens|low_i/high_i]
127 Add illumination effects. Optionally, set the range of intensi‐
128 ties from - to + max_intens. If not specified, 1 is used.
129 Alternatively, append low/high intensities to specify an asym‐
130 metric range [Default is no illumination].
131
132 -Jparameters (more ...)
133 Select map projection.
134
135 -Jz|Zparameters (more ...)
136 Set z-axis scaling; same syntax as -Jx.
137
138 -K (more ...)
139 Do not finalize the PostScript plot.
140
141 -L[i][gap]
142 Gives equal-sized color rectangles. Default scales rectangles
143 according to the z-range in the CPT (Also see -Z). If set, any
144 equal interval annotation set with -B will be ignored. If gap is
145 appended and the CPT is discrete we will center each annotation
146 on each rectangle, using the lower boundary z-value for the
147 annotation. If i is prepended we annotate the interval range
148 instead. If -I is used then each rectangle will have its con‐
149 stant color modified by the specified intensity.
150
151 -M Force a monochrome graybar using the (television) YIQ transfor‐
152 mation.
153
154 -N[p|dpi]
155 Controls how the color scale is represented by the PostScript
156 language. To preferentially draw color rectangles (e.g., for
157 discrete colors), append p. Otherwise we will preferentially
158 draw images (e.g., for continuous colors). Optionally append
159 effective dots-per-inch for rasterization of color scales [600].
160
161 -O (more ...)
162 Append to existing PostScript plot.
163
164 -P (more ...)
165 Select "Portrait" plot orientation.
166
167 -Q Select logarithmic scale and power of ten annotations. All
168 z-values in the CPT will be converted to p = log10(z) and only
169 integer p values will be annotated using the 10^p format
170 [Default is linear scale].
171
172 -Rwest/east/south/north[/zmin/zmax][+r][+uunit]
173 west, east, south, and north specify the region of interest, and
174 you may specify them in decimal degrees or in
175 [±]dd:mm[:ss.xxx][W|E|S|N] format Append +r if lower left and
176 upper right map coordinates are given instead of w/e/s/n. The
177 two shorthands -Rg and -Rd stand for global domain (0/360 and
178 -180/+180 in longitude respectively, with -90/+90 in latitude).
179 Alternatively for grid creation, give Rcodelon/lat/nx/ny, where
180 code is a 2-character combination of L, C, R (for left, center,
181 or right) and T, M, B for top, middle, or bottom. e.g., BL for
182 lower left. This indicates which point on a rectangular region
183 the lon/lat coordinate refers to, and the grid dimensions nx and
184 ny with grid spacings via -I is used to create the corresponding
185 region. Alternatively, specify the name of an existing grid
186 file and the -R settings (and grid spacing, if applicable) are
187 copied from the grid. Appending +uunit expects projected (Carte‐
188 sian) coordinates compatible with chosen -J and we inversely
189 project to determine actual rectangular geographic region. For
190 perspective view (-p), optionally append /zmin/zmax. In case of
191 perspective view (-p), a z-range (zmin, zmax) can be appended to
192 indicate the third dimension. This needs to be done only when
193 using the -Jz option, not when using only the -p option. In the
194 latter case a perspective view of the plane is plotted, with no
195 third dimension.
196
197 For perspective view p, optionally append /zmin/zmax. (more ...)
198
199 -S Do not separate different color intervals with black grid lines.
200
201 -U[[just]/dx/dy/][c|label] (more ...)
202 Draw GMT time stamp logo on plot.
203
204 -V[level] (more ...)
205 Select verbosity level [c].
206
207 -Wscale
208 Multiply all z-values in the CPT by the provided scale. By
209 default the CPT is used as is.
210
211 -X[a|c|f|r][x-shift[u]]
212
213 -Y[a|c|f|r][y-shift[u]] (more ...)
214 Shift plot origin.
215
216 -Zzfile
217 File with colorbar-width per color entry. By default, width of
218 entry is scaled to color range, i.e., z = 0-100 gives twice the
219 width as z = 100-150 (Also see -L).
220
221 -p[x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0] (more ...)
222 Select perspective view. (Required -R and -J for proper func‐
223 tioning).
224
225 -t[transp] (more ...)
226 Set PDF transparency level in percent.
227
228 -^ or just -
229 Print a short message about the syntax of the command, then
230 exits (NOTE: on Windows just use -).
231
232 -+ or just +
233 Print an extensive usage (help) message, including the explana‐
234 tion of any module-specific option (but not the GMT common
235 options), then exits.
236
237 -? or no arguments
238 Print a complete usage (help) message, including the explanation
239 of all options, then exits.
240
242 To plot a a horizontal color scale (12 cm long; 0.5 cm wide) at the
243 reference point (8,1) (paper coordinates) with justification at top
244 center and automatic annotation interval, do
245
246 gmt makecpt -T-200/1000/100 -Crainbow > t.cpt
247 gmt psscale -Ct.cpt -Dx8c/1c+w12c/0.5c+jTC+h -Bxaf+l"topography" -By+lkm > map.ps
248
249 To append a vertical color scale (7.5 cm long; 1.25 cm wide) to the
250 right of a plot that is 6 inch wide and 4 inch high, using illumina‐
251 tion, and show back- and foreground colors, and annotating every 5
252 units, we provide the reference point and select the left-mid anchor
253 point via
254
255 gmt psscale -Dx6.5i+jLM/2i+w7.5c/1.25c+e -O -Ccolors.cpt -I -Bx5+lBATHYMETRY -By+lm >> map.ps
256
257 To overlay a horizontal color scale (4 inches long and default width)
258 above a Mercator map produced by a previous call, ensuring a 2 cm off‐
259 set from the map frame, use
260
261 gmt psscale -DjCT+w4i+o0/2c+h -O -Ccolors.cpt -Baf -R -J >> map.ps
262
264 When the CPT is discrete and no illumination is specified, the color
265 bar will be painted using polygons. For all other cases we must paint
266 with an image. Some color printers may give slightly different colors
267 for the two methods given identical RGB values.
268
270 gmt, makecpt gmtlogo, grd2cpt psimage, pslegend
271
273 2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
274
275
276
277
2785.4.5 Feb 24, 2019 PSSCALE(1)