1PSBASEMAP(1) GMT PSBASEMAP(1)
2
3
4
6 psbasemap - Plot PostScript base maps
7
9 psbasemap -Jparameters
10 -Rwest/east/south/north[/zmin/zmax][+r] [ -B[p|s]parameters ] [
11 -A[file] ] [ -Dinsert box ] [ -Fbox ] [ -K ] [ -Jz|Zparameters ] [
12 -Lscalebar ] [ -O ] [ -P ] [ -U[stamp] ] [ -Trose ] [ -Tmag_rose ]
13 [ -V[level] ] [ -Xx_offset ] [ -Yy_offset ] [ -fflags ] [ -pflags ]
14 [ -ttransp ]
15
16 Note: No space is allowed between the option flag and the associated
17 arguments.
18
20 psbasemap creates PostScript code that will produce a basemap. Several
21 map projections are available, and the user may specify separate
22 tick-mark intervals for boundary annotation, ticking, and [optionally]
23 gridlines. A simple map scale or directional rose may also be plotted.
24 At least one of the options -B, -L, or -T must be specified.
25
27 -Jparameters (more ...)
28 Select map projection.
29
30 -Rxmin/xmax/ymin/ymax[+r][+uunit] (more ...)
31 Specify the region of interest.
32
33 For perspective view p, optionally append /zmin/zmax. (more ...)
34
36 -A[file]
37 No plotting is performed. Instead, we determine the geographi‐
38 cal coordinates of the polygon outline for the (possibly
39 oblique) rectangular map domain. The plot domain must be given
40 via -R and -J, with no other options allowed. The sampling
41 interval is controlled via MAP_LINE_STEP parameter. The coordi‐
42 nates are written to file or to standard output if no file is
43 specified.
44
45 -B[p|s]parameters (more ...)
46 Set map boundary frame and axes attributes.
47
48 -D[unit]xmin/xmax/ymin/ymax[r][+sfile][+t] | -D[g|j|J|n|x]ref‐
49 point+wwidth[/height][+jjustify][+odx[/dy]][+sfile][+t]
50 Draw a simple map insert box on the map. Requires -F. Specify
51 the box in one of three ways: (a) Give west/east/south/north of
52 geographic rectangle bounded by parallels and meridians; append
53 r if the coordinates instead are the lower left and upper right
54 corners of the desired rectangle. (b) Give uxmin/xmax/ymin/ymax
55 of bounding rectangle in projected coordinates (here, u is the
56 coordinate unit). (c) Give the reference point on the map for
57 the insert using one of four coordinate systems: (1) Use -Dg for
58 map (user) coordinates, (2) use -Dj or -DJ for setting refpoint
59 via a 2-char justification code that refers to the (invisible)
60 map domain rectangle, (3) use -Dn for normalized (0-1) coordi‐
61 nates, or (4) use -Dx for plot coordinates (inches, cm, etc.).
62 Append +wwidth[/height] of bounding rectangle or box in plot
63 coordinates (inches, cm, etc.). By default, the anchor point on
64 the scale is assumed to be the bottom left corner (BL), but this
65 can be changed by appending +j followed by a 2-char justifica‐
66 tion code justify (see pstext). Note: If -Dj is used then jus‐
67 tify defaults to the same as refpoint, if -DJ is used then jus‐
68 tify defaults to the mirror opposite of refpoint. Add +o to
69 offset the inset fig by dx/dy away from the refpoint point in
70 the direction implied by justify (or the direction implied by
71 -Dj or -DJ). If you need access to the placement of the lower
72 left corner of the map insert and its dimensions in the current
73 map unit, use +sfile to write this information to file. Alter‐
74 natively, you may append +t to translate the plot origin to the
75 lower left corner of the map insert. Specify insert box
76 attributes via the -F option [outline only].
77
78 -F[d|l|t][+cclear‐
79 ances][+gfill][+i[[gap/]pen]][+p[pen]][+r[radius]][+s[[dx/dy/][shade]]]
80 Without further options, draws a rectangular border around any
81 map insert (-D), map scale (-L) or map rose (-T) using
82 MAP_FRAME_PEN; specify a different pen with +ppen. Add +gfill
83 to fill the logo box [no fill]. Append +cclearance where clear‐
84 ance is either gap, xgap/ygap, or lgap/rgap/bgap/tgap where
85 these items are uniform, separate in x- and y-direction, or
86 individual side spacings between logo and border. Append +i to
87 draw a secondary, inner border as well. We use a uniform gap
88 between borders of 2p and the MAP_DEFAULT_PEN unless other val‐
89 ues are specified. Append +r to draw rounded rectangular borders
90 instead, with a 6p corner radius. You can override this radius
91 by appending another value. Finally, append +s to draw an offset
92 background shaded region. Here, dx/dy indicates the shift rela‐
93 tive to the foreground frame [4p/-4p] and shade sets the fill
94 style to use for shading [gray50]. Used in combination with -D,
95 -L or -T. To specify separate parameters for the various map
96 features, append d|l|t to -F to specify panel parameters for
97 just that panel [Default uses the same panel parameters for all
98 selected map features].
99
100 -Jz|Zparameters (more ...)
101 Set z-axis scaling; same syntax as -Jx.
102
103 -K (more ...)
104 Do not finalize the PostScript plot.
105
106 -L[g|j|J|n|x]ref‐
107 point+c[slon/]slat+wlength[e|f|k|M|n|u][+aalign][+f][+jjus‐
108 tify][+l[label]][+odx[/dy]][+u]
109 Draws a simple map scale centered on the reference point speci‐
110 fied using one of four coordinate systems: (1) Use -Lg for map
111 (user) coordinates, (2) use -Lj or -LJ for setting refpoint via
112 a 2-char justification code that refers to the (invisible) map
113 domain rectangle, (3) use -Ln for normalized (0-1) coordinates,
114 or (4) use -Lx for plot coordinates (inches, cm, etc.). Scale
115 is calculated for latitude slat (optionally supply longitude
116 slon for oblique projections [Default is central meridian]),
117 length is in km, or append unit from e|f|k|M|n|u. Change the
118 label alignment with +aalign (choose among l(eft), r(ight),
119 t(op), and b(ottom)). Append +f to get a "fancy" scale [Default
120 is plain]. By default, the anchor point on the map scale is
121 assumed to be the center of the scale (MC), but this can be
122 changed by appending +j followed by a 2-char justification code
123 justify (see pstext for list and explanation of codes). Append
124 +l to select the default label, which equals the distance unit
125 (meter, foot, km, mile, nautical mile, US survey foot) and is
126 justified on top of the scale [t]. Change this by giving your
127 own label (append +llabel). Add +o to offset the map scale by
128 dx/dy away from the refpoint in the direction implied by justify
129 (or the direction implied by -Dj or -DJ). Select +u to append
130 the unit to all distance annotations along the scale (for the
131 plain scale, +u will instead select the unit to be appended to
132 the distance length). Note: Use FONT_LABEL to change the label
133 font and FONT_ANNOT_PRIMARY to change the annotation font. The
134 height of the map scale is controlled by MAP_SCALE_HEIGHT, and
135 the pen thickness is set by MAP_TICK_PEN_PRIMARY. See -F on how
136 to place a panel behind the scale.
137
138 -O (more ...)
139 Append to existing PostScript plot.
140
141 -P (more ...)
142 Select "Portrait" plot orientation.
143
144 -Td[g|j|J|n|x]refpoint+wwidth[+f[level]][+jjus‐
145 tify][+lw,e,s,n][+odx[/dy]]
146 -Td draws a map directional rose on the map at the location
147 defined by the reference and anchor points: Give the reference
148 point on the map for the rose using one of four coordinate sys‐
149 tems: (1) Use g for map (user) coordinates, (2) use j for set‐
150 ting refpoint via a 2-char justification code that refers to the
151 (invisible) map domain rectangle, (3) use n for normalized (0-1)
152 coordinates, or (4) use x for plot coordinates (inches, cm,
153 etc.) [Default]. You can offset the reference point by dx/dy in
154 the direction implied by justify. By default, the anchor point
155 on the scale is assumed to be the center of the rose (MC), but
156 this can be changed by appending +j followed by a 2-char justi‐
157 fication code justify (see pstext for list and explanation of
158 codes). Note: If -Dj is used then justify defaults to the same
159 as refpoint, if -DJ is used then justify defaults to the mirror
160 opposite of refpoint. Add +o to offset the color scale by dx/dy
161 away from the refpoint in the direction implied by justify (or
162 the direction implied by -Dj or -DJ). Append +wwidth to set the
163 width of the rose in plot coordinates (in inches, cm, or
164 points). Add +f to get a "fancy" rose, and specify in level
165 what you want drawn. The default [1] draws the two principal
166 E-W, N-S orientations, 2 adds the two intermediate NW-SE and
167 NE-SW orientations, while 3 adds the eight minor orientations
168 WNW-ESE, NNW-SSE, NNE-SSW, and ENE-WSW. Label the cardinal
169 points W,E,S,N by adding +l and append your own four comma-sepa‐
170 rated strings to override the default. Skip a specific label by
171 leaving it blank. See Placing-dir-map-roses and -F on how to
172 place a panel behind the scale.
173
174 -Tm[g|j|J|n|x]refpoint+wwidth[+ddec[/dlabel]]][+ipen][+jjus‐
175 tify][+lw,e,s,n][+ppen][+tints][+odx[/dy]]
176 -Tm draws a map magnetic rose on the map at the location defined by
177 the reference and anchor points: Give the reference point on the map
178 for the rose using one of four coordinate systems: (1) Use g for map
179 (user) coordinates, (2) use j for setting refpoint via a 2-char jus‐
180 tification code that refers to the (invisible) map domain rectangle,
181 (3) use n for normalized (0-1) coordinates, or (4) use x for plot
182 coordinates (inches, cm, etc.) [Default]. You can offset the refer‐
183 ence point by dx/dy in the direction implied by justify. By
184 default, the anchor point on the scale is assumed to be the center
185 of the rose (MC), but this can be changed by appending +j followed
186 by a 2-char justification code justify (see pstext for list and
187 explanation of codes). Note: If -Dj is used then justify defaults
188 to the same as refpoint, if -DJ is used then justify defaults to the
189 mirror opposite of refpoint. Add +o to offset the color scale by
190 dx/dy away from the refpoint in the direction implied by justify (or
191 the direction implied by -Dj or -DJ). Append +wwidth to set the
192 width of the rose in plot coordinates (in inches, cm, or points).
193 Use +d to assign the magnetic declination and set dlabel, which is a
194 label for the magnetic compass needle (Leave empty to format a label
195 from dec, or give - to bypass labeling). With +d, both directions to
196 geographic and magnetic north are plotted [Default is geographic
197 only]. If the north label is * then a north star is plotted instead
198 of the north label. Annotation and two levels of tick intervals for
199 both geographic and magnetic directions default to 30/5/1 degrees;
200 override these settings by appending +tints, and append six
201 slash-separated intervals to set both the geographic (first three)
202 and magnetic (last three) intervals. Label the cardinal points
203 W,E,S,N by adding +l and append your own four comma-separated
204 strings to override the default. Skip a specific label by leaving
205 it blank. Number GMT default parameters control pens, fonts, and
206 color. See Placing-dir-map-roses and -F on how to place a panel
207 behind the scale.
208
209 -U[[just]/dx/dy/][c|label] (more ...)
210 Draw GMT time stamp logo on plot.
211
212 -V[level] (more ...)
213 Select verbosity level [c].
214
215 -X[a|c|f|r][x-shift[u]]
216
217 -Y[a|c|f|r][y-shift[u]] (more ...)
218 Shift plot origin.
219
220 -f[i|o]colinfo (more ...)
221 Specify data types of input and/or output columns. This applies
222 only to the coordinates specified in the -R option.
223
224 -p[x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0] (more ...)
225 Select perspective view.
226
227 -t[transp] (more ...)
228 Set PDF transparency level in percent.
229
230 -^ or just -
231 Print a short message about the syntax of the command, then
232 exits (NOTE: on Windows just use -).
233
234 -+ or just +
235 Print an extensive usage (help) message, including the explana‐
236 tion of any module-specific option (but not the GMT common
237 options), then exits.
238
239 -? or no arguments
240 Print a complete usage (help) message, including the explanation
241 of all options, then exits.
242
244 The following section illustrates the use of the options by giving some
245 examples for the available map projections. Note how scales may be
246 given in several different ways depending on the projection. Also note
247 the use of upper case letters to specify map width instead of map
248 scale.
249
251 Linear x-y plot
252 To make a linear x/y frame with all axes, but with only left and bottom
253 axes annotated, using xscale = yscale = 1.0, ticking every 1 unit and
254 annotating every 2, and using xlabel = "Distance" and ylabel = "No of
255 samples", use
256
257 gmt psbasemap -R0/9/0/5 -Jx1 -Bf1a2 -Bx+lDistance -By+l"No of samples" -BWeSn > linear.ps
258
259 Log-log plot
260 To make a log-log frame with only the left and bottom axes, where the
261 x-axis is 25 cm and annotated every 1-2-5 and the y-axis is 15 cm and
262 annotated every power of 10 but has tick-marks every 0.1, run
263
264 gmt psbasemap -R1/10000/1e20/1e25 -JX25cl/15cl -Bx2+lWavelength -Bya1pf3+lPower -BWS > loglog.ps
265
266 Power axes
267 To design an axis system to be used for a depth-sqrt(age) plot with
268 depth positive down, ticked and annotated every 500m, and ages anno‐
269 tated at 1 my, 4 my, 9 my etc, use
270
271 gmt psbasemap -R0/100/0/5000 -Jx1p0.5/-0.001 -Bx1p+l"Crustal age" -By500+lDepth > power.ps
272
273 Polar (theta,r) plot
274 For a base map for use with polar coordinates, where the radius from 0
275 to 1000 should correspond to 3 inch and with gridlines and ticks inter‐
276 vals automatically determined, use
277
278 gmt psbasemap -R0/360/0/1000 -JP6i -Bafg > polar.ps
279
281 Cassini
282 A 10-cm-wide basemap using the Cassini projection may be obtained by
283
284 gmt psbasemap -R20/50/20/35 -JC35/28/10c -P -Bafg -B+tCassini > cassini.ps
285
286 Mercator [conformal]
287 A Mercator map with scale 0.025 inch/degree along equator, and showing
288 the length of 5000 km along the equator (centered on 1/1 inch), may be
289 plotted as
290
291 gmt psbasemap -R90/180/-50/50 -Jm0.025i -Bafg -B+tMercator -Lx1i/1i+c0+w5000k > mercator.ps
292
293 Miller
294 A global Miller cylindrical map with scale 1:200,000,000 may be plotted
295 as
296
297 gmt psbasemap -Rg -Jj180/1:200000000 -Bafg -B+tMiller > miller.ps
298
299 Oblique Mercator [conformal]
300 To create a page-size global oblique Mercator basemap for a pole at
301 (90,30) with gridlines every 30 degrees, run
302
303 gmt psbasemap -R0/360/-70/70 -Joc0/0/90/30/0.064cd -B30g30 -B+t"Oblique Mercator" > oblmerc.ps
304
305 Transverse Mercator [conformal]
306 A regular Transverse Mercator basemap for some region may look like
307
308 gmt psbasemap -R69:30/71:45/-17/-15:15 -Jt70/1:1000000 -Bafg -B+t"Survey area" -P > transmerc.ps
309
310 Equidistant Cylindrical Projection
311 This projection only needs the central meridian and scale. A 25 cm wide
312 global basemap centered on the 130E meridian is made by
313
314 gmt psbasemap -R-50/310/-90/90 -JQ130/25c -Bafg -B+t"Equidistant Cylindrical" > cyl_eqdist.ps
315
316 Universal Transverse Mercator [conformal]
317 To use this projection you must know the UTM zone number, which defines
318 the central meridian. A UTM basemap for Indo-China can be plotted as
319
320 gmt psbasemap -R95/5/108/20r -Ju46/1:10000000 -Bafg -B+tUTM > utm.ps
321
322 Cylindrical Equal-Area
323 First select which of the cylindrical equal-area projections you want
324 by deciding on the standard parallel. Here we will use 45 degrees which
325 gives the Gall projection. A 9 inch wide global basemap centered on the
326 Pacific is made by
327
328 gmt psbasemap -Rg -JY180/45/9i -Bafg -B+tGall > gall.ps
329
331 Albers [equal-area]
332 A basemap for middle Europe may be created by
333
334 gmt psbasemap -R0/90/25/55 -Jb45/20/32/45/0.25c -Bafg -B+t"Albers Equal-area" > albers.ps
335
336 Lambert [conformal]
337 Another basemap for middle Europe may be created by
338
339 gmt psbasemap -R0/90/25/55 -Jl45/20/32/45/0.1i -Bafg -B+t"Lambert Conformal Conic" > lambertc.ps
340
341 Equidistant
342 Yet another basemap of width 6 inch for middle Europe may be created by
343
344 gmt psbasemap -R0/90/25/55 -JD45/20/32/45/6i -Bafg -B+t"Equidistant conic" > econic.ps
345
346 Polyconic
347 A basemap for north America may be created by
348
349 gmt psbasemap -R-180/-20/0/90 -JPoly/4i -Bafg -B+tPolyconic > polyconic.ps
350
352 Lambert [equal-area]
353 A 15-cm-wide global view of the world from the vantage point -80/-30
354 will give the following basemap:
355
356 gmt psbasemap -Rg -JA-80/-30/15c -Bafg -B+t"Lambert Azimuthal" > lamberta.ps
357
358 Follow the instructions for stereographic projection if you want to
359 impose rectangular boundaries on the azimuthal equal-area map but sub‐
360 stitute -Ja for -Js.
361
362 Equidistant
363 A 15-cm-wide global map in which distances from the center (here
364 125/10) to any point is true can be obtained by:
365
366 gmt psbasemap -Rg -JE125/10/15c -Bafg -B+tEquidistant > equi.ps
367
368 Gnomonic
369 A view of the world from the vantage point -100/40 out to a horizon of
370 60 degrees from the center can be made using the Gnomonic projection:
371
372 gmt psbasemap -Rg -JF-100/40/60/6i -Bafg -B+tGnomonic > gnomonic.ps
373
374 Orthographic
375 A global perspective (from infinite distance) view of the world from
376 the vantage point 125/10 will give the following 6-inch-wide basemap:
377
378 gmt psbasemap -Rg -JG125/10/6i -Bafg -B+tOrthographic > ortho.ps
379
380 General Perspective
381 The -JG option can be used in a more generalized form, specifying alti‐
382 tude above the surface, width and height of the view point, and twist
383 and tilt. A view from 160 km above -74/41.5 with a tilt of 55 and
384 azimuth of 210 degrees, and limiting the viewpoint to 30 degrees width
385 and height will product a 6-inch-wide basemap:
386
387 gmt psbasemap -Rg -JG-74/41.5/160/210/55/30/30/6i -Bafg -B+t"General Perspective" > genper.ps
388
389 Stereographic [conformal]
390 To make a polar stereographic projection basemap with radius = 12 cm to
391 -60 degree latitude, with plot title "Salinity measurements", using 5
392 degrees annotation/tick interval and 1 degree gridlines, run
393
394 gmt psbasemap -R-45/45/-90/-60 -Js0/-90/12c/-60 -B5g1 -B+t"Salinity measurements" > stereo1.ps
395
396 To make a 12-cm-wide stereographic basemap for Australia from an arbi‐
397 trary view point (not the poles), and use a rectangular boundary, we
398 must give the pole for the new projection and use the -R option to
399 indicate the lower left and upper right corners (in lon/lat) that will
400 define our rectangle. We choose a pole at 130/-30 and use 100/-45 and
401 160/-5 as our corners. The command becomes
402
403 gmt psbasemap -R100/-45/160/-5r -JS130/-30/12c -Bafg -B+t"General Stereographic View" > stereo2.ps
404
406 Hammer [equal-area]
407 The Hammer projection is mostly used for global maps and thus the
408 spherical form is used. To get a world map centered on Greenwich at a
409 scale of 1:200000000, use
410
411 gmt psbasemap -Rd -Jh0/1:200000000 -Bafg -B+tHammer > hammer.ps
412
413 Sinusoidal [equal-area]
414 To make a sinusoidal world map centered on Greenwich, with a scale
415 along the equator of 0.02 inch/degree, use
416
417 gmt psbasemap -Rd -Ji0/0.02i -Bafg -B+tSinusoidal > sinus1.ps
418
419 To make an interrupted sinusoidal world map with breaks at 160W, 20W,
420 and 60E, with a scale along the equator of 0.02 inch/degree, run the
421 following sequence of commands:
422
423 gmt psbasemap -R-160/-20/-90/90 -Ji-90/0.02i -Bx30g30 -By15g15 -BWesn -K > sinus_i.ps
424 gmt psbasemap -R-20/60/-90/90 -Ji20/0.02i -Bx30g30 -By15g15 -Bwesn -O -K -X2.8i >> sinus_i.ps
425 gmt psbasemap -R60/200/-90/90 -Ji130/0.02i -Bx30g30 -By15g15 -BwEsn -O -X1.6i >> sinus_i.ps
426
427 Eckert IV [equal-area]
428 Pseudo-cylindrical projection typically used for global maps only. Set
429 the central longitude and scale, e.g.,
430
431 gmt psbasemap -Rg -Jkf180/0.064c -Bafg -B+t"Eckert IV" > eckert4.ps
432
433 Eckert VI [equal-area]
434 Another pseudo-cylindrical projection typically used for global maps
435 only. Set the central longitude and scale, e.g.,
436
437 gmt psbasemap -Rg -Jks180/0.064c -Bafg -B+t"Eckert VI" > eckert6.ps
438
439 Robinson
440 Projection designed to make global maps "look right". Set the central
441 longitude and width, e.g.,
442
443 gmt psbasemap -Rd -JN0/8i -Bafg -B+tRobinson > robinson.ps
444
445 Winkel Tripel
446 Yet another projection typically used for global maps only. You can set
447 the central longitude, e.g.,
448
449 gmt psbasemap -R90/450/-90/90 -JR270/25c -Bafg -B+t"Winkel Tripel" > winkel.ps
450
451 Mollweide [equal-area]
452 The Mollweide projection is also mostly used for global maps and thus
453 the spherical form is used. To get a 25-cm-wide world map centered on
454 the Dateline:
455
456 psbasemap -Rg -JW180/25c -Bafg -B+tMollweide > mollweide.ps
457
458 Van der Grinten
459 The Van der Grinten projection is also mostly used for global maps and
460 thus the spherical form is used. To get a 18-cm-wide world map centered
461 on the Dateline:
462
463 gmt psbasemap -Rg -JV180/18c -Bafg -B+t"Van der Grinten" > grinten.ps
464
465 Arbitrary rotation
466 If you need to plot a map but have it rotated about a vertical axis
467 then use the -p option. For instance, the rotate the basemap below 90
468 degrees about an axis centered on the map, try
469
470 gmt psbasemap -R10/40/10/40 -JM10c -P -Bafg -B+t"I am rotated" -p90+w25/25 -Xc > rotated.ps
471
473 The -B option sets up a regular annotation interval and the annotations
474 derive from the corresponding x, y, or z coordinates. However, some
475 applications requires special control on which annotations to plot and
476 even replace the annotation with other labels. This is achieved by
477 using cintfile in the -B option, where intfile contains all the infor‐
478 mation about annotations, ticks, and even gridlines. Each record is of
479 the form coord type [label], where coord is the coordinate for this
480 annotation (or tick or gridline), type is one or more letters from a
481 (annotation), i interval annotation, f tickmark, and g gridline. Note
482 that a and i are mutually exclusive and cannot both appear in the same
483 intfile. Both a and i requires you to supply a label which is used as
484 the plot annotation. If not given then a regular formatted annotation
485 based on the coordinate will occur.
486
488 For some projections, a spherical earth is implicitly assumed. A warn‐
489 ing will notify the user if -V is set.
490
492 The -B option is somewhat complicated to explain and comprehend. How‐
493 ever, it is fairly simple for most applications (see examples).
494
496 gmt, gmt.conf, gmtcolors
497
499 2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
500
501
502
503
5045.4.5 Feb 24, 2019 PSBASEMAP(1)