Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

basemap.rst 11 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
  1. .. index:: ! basemap
  2. .. include:: module_core_purpose.rst_
  3. *******
  4. basemap
  5. *******
  6. |basemap_purpose|
  7. Synopsis
  8. --------
  9. .. include:: common_SYN_OPTs.rst_
  10. **gmt basemap** |-J|\ *parameters*
  11. |SYN_OPT-Rz|
  12. [ |-A|\ [*file*] ]
  13. [ |SYN_OPT-B| ]
  14. [ |-F|\ *box* ]
  15. [ |-J|\ **z**\|\ **Z**\ *parameters* ]
  16. [ |-L|\ *scalebar* ]
  17. [ |-T|\ *rose* ]
  18. [ |-T|\ *mag_rose* ]
  19. [ |SYN_OPT-U| ]
  20. [ |SYN_OPT-V| ]
  21. [ |SYN_OPT-X| ]
  22. [ |SYN_OPT-Y| ]
  23. [ |SYN_OPT-f| ]
  24. [ |SYN_OPT-p| ]
  25. [ |SYN_OPT-t| ]
  26. [ |SYN_OPT--| ]
  27. .. include:: basemap_common.rst_
  28. Examples
  29. --------
  30. .. include:: oneliner_info.rst_
  31. The following section illustrates the use of the options by giving some
  32. examples for the available map projections. Note how scales may be given
  33. in several different ways depending on the projection. Also note the use
  34. of upper case letters to specify map width instead of map scale.
  35. Non-geographical Projections
  36. ----------------------------
  37. Linear x-y plot
  38. ~~~~~~~~~~~~~~~
  39. To make a linear x/y frame with all axes, but with only left and bottom
  40. axes annotated, using xscale = yscale = 1cm per unit, ticking every 1 unit and
  41. annotating every 2, and using xlabel = "Distance" and ylabel = "No of samples", use
  42. ::
  43. gmt begin linear
  44. gmt basemap -R0/9/0/5 -Jx1c -Bf1a2 -Bx+lDistance -By+l"No of samples" -BWeSn
  45. gmt end show
  46. As mentioned above, such simple modern mode script can take advantage of the one-liner
  47. format. We repeat the same example using the one-liner format and then only show this
  48. format for the remaining examples:
  49. ::
  50. gmt basemap -R0/9/0/5 -Jx1c -Bf1a2 -Bx+lDistance -By+l"No of samples" -BWeSn -pdf linear
  51. Log-log plot
  52. ~~~~~~~~~~~~
  53. To make a log-log frame with only the left and bottom axes, where the
  54. x-axis is 25 cm and annotated every 1-2-5 and the y-axis is 15 cm and
  55. annotated every power of 10 but has tick-marks every 0.1, run
  56. ::
  57. gmt basemap -R1/10000/1e20/1e25 -JX25cl/15cl -Bx2+lWavelength -Bya1pf3+lPower -BWS -pdf loglog
  58. Power axes
  59. ~~~~~~~~~~
  60. To design an axis system to be used for a depth-sqrt(age) plot with
  61. depth positive down, ticked and annotated every 500m, and ages (in millions of years) annotated
  62. at 1 My, 4 My, 9 My etc., use
  63. ::
  64. gmt basemap -R0/100/0/5000 -Jx1cp0.5/-0.001c -Bx1p+l"Crustal age" -By500+lDepth -pdf power
  65. Polar (theta,r) plot
  66. ~~~~~~~~~~~~~~~~~~~~
  67. For a base map for use with polar coordinates, where the radius from 0
  68. to 1000 should correspond to 3 inch and with gridlines and ticks intervals
  69. automatically determined, use
  70. ::
  71. gmt basemap -R0/360/0/1000 -JP6i -Bafg -pdf polar
  72. Cylindrical Map Projections
  73. ---------------------------
  74. Cassini
  75. ~~~~~~~
  76. A 10-cm-wide basemap using the Cassini projection may be obtained by
  77. ::
  78. gmt basemap -R20/50/20/35 -JC35/28/10c -Bafg -B+tCassini -pdf cassini
  79. Mercator [conformal]
  80. ~~~~~~~~~~~~~~~~~~~~
  81. A Mercator map with scale 0.025 inch/degree along equator, and showing
  82. the length of 5000 km along the equator (centered on 1/1 inch), may be
  83. plotted as
  84. ::
  85. gmt basemap -R90/180/-50/50 -Jm0.025i -Bafg -B+tMercator -Lx1i/1i+c0+w5000k -pdf mercator
  86. Miller
  87. ~~~~~~
  88. A global Miller cylindrical map with scale 1:200,000,000 may be plotted as
  89. ::
  90. gmt basemap -Rg -Jj180/1:200000000 -Bafg -B+tMiller -pdf miller
  91. Oblique Mercator [conformal]
  92. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  93. To create a page-size global oblique Mercator basemap for a pole at
  94. (90,30) with gridlines every 30 degrees, run
  95. ::
  96. gmt basemap -R0/360/-70/70 -Joc0/0/90/30/0.064cd -B30g30 -B+t"Oblique Mercator" -pdf oblmerc
  97. Transverse Mercator [conformal]
  98. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  99. A regular Transverse Mercator basemap for some region may look like
  100. ::
  101. gmt basemap -R69:30/71:45/-17/-15:15 -Jt70/1:1000000 -Bafg -B+t"Survey area" -pdf transmerc
  102. Equidistant Cylindrical Projection
  103. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  104. This projection only needs the central meridian and scale. A 25 cm wide
  105. global basemap centered on the 130E meridian is made by
  106. ::
  107. gmt basemap -R-50/310/-90/90 -JQ130/25c -Bafg -B+t"Equidistant Cylindrical" -pdf cyl_eqdist
  108. Universal Transverse Mercator [conformal]
  109. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  110. To use this projection you must know the UTM zone number, which defines
  111. the central meridian. A UTM basemap for Indo-China can be plotted as
  112. ::
  113. gmt basemap -R95/5/108/20r -Ju46/1:10000000 -Bafg -B+tUTM -pdf utm
  114. Cylindrical Equal-Area
  115. ~~~~~~~~~~~~~~~~~~~~~~
  116. First select which of the cylindrical equal-area projections you want by
  117. deciding on the standard parallel. Here we will use 45 degrees which
  118. gives the Gall projection. A 9 inch wide global basemap centered
  119. on the Pacific is made by
  120. ::
  121. gmt basemap -Rg -JY180/45/9i -Bafg -B+tGall -pdf gall
  122. Conic Map Projections
  123. ---------------------
  124. Albers [equal-area]
  125. ~~~~~~~~~~~~~~~~~~~
  126. A basemap for middle Europe may be created by
  127. ::
  128. gmt basemap -R0/90/25/55 -Jb45/20/32/45/0.25c -Bafg -B+t"Albers Equal-area" -pdf albers
  129. Lambert [conformal]
  130. ~~~~~~~~~~~~~~~~~~~
  131. Another basemap for middle Europe may be created by
  132. ::
  133. gmt basemap -R0/90/25/55 -Jl45/20/32/45/0.1i -Bafg -B+t"Lambert Conformal Conic" -pdf lambertc
  134. Equidistant
  135. ~~~~~~~~~~~
  136. Yet another basemap of width 6 inch for middle Europe may be created by
  137. ::
  138. gmt basemap -R0/90/25/55 -JD45/20/32/45/6i -Bafg -B+t"Equidistant conic" -pdf econic
  139. Polyconic
  140. ~~~~~~~~~
  141. A basemap for north America may be created by
  142. ::
  143. gmt basemap -R-180/-20/0/90 -JPoly/4i -Bafg -B+tPolyconic -pdf polyconic
  144. Azimuthal Map Projections
  145. -------------------------
  146. Lambert [equal-area]
  147. ~~~~~~~~~~~~~~~~~~~~
  148. A 15-cm-wide global view of the world from the vantage point -80/-30
  149. will give the following basemap:
  150. ::
  151. gmt basemap -Rg -JA-80/-30/15c -Bafg -B+t"Lambert Azimuthal" -pdf lamberta
  152. Follow the instructions for stereographic projection if you want to
  153. impose rectangular boundaries on the azimuthal equal-area map but
  154. substitute **-Ja** for **-Js**.
  155. Equidistant
  156. ~~~~~~~~~~~
  157. A 15-cm-wide global map in which distances from the center (here 125/10)
  158. to any point is true can be obtained by:
  159. ::
  160. gmt basemap -Rg -JE125/10/15c -Bafg -B+tEquidistant -pdf equi
  161. Gnomonic
  162. ~~~~~~~~
  163. A view of the world from the vantage point -100/40 out to a horizon of
  164. 60 degrees from the center can be made using the Gnomonic projection:
  165. ::
  166. gmt basemap -Rg -JF-100/40/60/6i -Bafg -B+tGnomonic -pdf gnomonic
  167. Orthographic
  168. ~~~~~~~~~~~~
  169. A global perspective (from infinite distance) view of the world from the
  170. vantage point 125/10 will give the following 6-inch-wide basemap:
  171. ::
  172. gmt basemap -Rg -JG125/10/6i -Bafg -B+tOrthographic -pdf ortho
  173. General Perspective
  174. ~~~~~~~~~~~~~~~~~~~
  175. The **-JG** option can be used in a more generalized form, specifying
  176. altitude above the surface, width and height of the view point, and
  177. twist and tilt. A view from 160 km above -74/41.5 with a tilt of 55 and
  178. azimuth of 210 degrees, and limiting the viewpoint to 30 degrees width
  179. and height will product a 6-inch-wide basemap:
  180. ::
  181. gmt basemap -Rg -JG-74/41.5/160/210/55/30/30/6i -Bafg -B+t"General Perspective" -pdf genper
  182. Stereographic [conformal]
  183. ~~~~~~~~~~~~~~~~~~~~~~~~~
  184. To make a polar stereographic projection basemap with radius = 12 cm to
  185. -60 degree latitude, with plot title "Salinity measurements", using 5
  186. degrees annotation/tick interval and 1 degree gridlines, run
  187. ::
  188. gmt basemap -R-45/45/-90/-60 -Js0/-90/12c/-60 -B5g1 -B+t"Salinity measurements" -pdf stereo1
  189. To make a 12-cm-wide stereographic basemap for Australia from an
  190. arbitrary view point (not the poles), and use a rectangular boundary, we
  191. must give the pole for the new projection and use the **-R** option to
  192. indicate the lower left and upper right corners (in lon/lat) that will
  193. define our rectangle. We choose a pole at 130/-30 and use 100/-45 and
  194. 160/-5 as our corners. The command becomes
  195. ::
  196. gmt basemap -R100/-45/160/-5r -JS130/-30/12c -Bafg -B+t"General Stereographic View" -pdf stereo2
  197. Miscellaneous Map Projections
  198. -----------------------------
  199. Hammer [equal-area]
  200. ~~~~~~~~~~~~~~~~~~~
  201. The Hammer projection is mostly used for global maps and thus the
  202. spherical form is used. To get a world map centered on Greenwich at a
  203. scale of 1:200000000, use
  204. ::
  205. gmt basemap -Rd -Jh0/1:200000000 -Bafg -B+tHammer -pdf hammer
  206. Sinusoidal [equal-area]
  207. ~~~~~~~~~~~~~~~~~~~~~~~
  208. To make a sinusoidal world map centered on Greenwich, with a scale along
  209. the equator of 0.02 inch/degree, use
  210. ::
  211. gmt basemap -Rd -Ji0/0.02i -Bafg -B+tSinusoidal -pdf sinus1
  212. To make an interrupted sinusoidal world map with breaks at 160W, 20W,
  213. and 60E, with a scale along the equator of 0.02 inch/degree, run the
  214. following sequence of commands:
  215. ::
  216. gmt begin
  217. gmt basemap -R-160/-20/-90/90 -Ji-90/0.02i -Bx30g30 -By15g15 -BWesn
  218. gmt basemap -Bx30g30 -By15g15 -Bwesn -X2.8i
  219. gmt basemap -Bx30g30 -By15g15 -BwEsn -X1.6i
  220. gmt end show
  221. Eckert IV [equal-area]
  222. ~~~~~~~~~~~~~~~~~~~~~~
  223. Pseudo-cylindrical projection typically used for global maps only. Set
  224. the central longitude and scale, e.g.,
  225. ::
  226. gmt basemap -Rg -Jkf180/0.064c -Bafg -B+t"Eckert IV" -pdf eckert4
  227. Eckert VI [equal-area]
  228. ~~~~~~~~~~~~~~~~~~~~~~
  229. Another pseudo-cylindrical projection typically used for global maps
  230. only. Set the central longitude and scale, e.g.,
  231. ::
  232. gmt basemap -Rg -Jks180/0.064c -Bafg -B+t"Eckert VI" -pdf eckert6
  233. Robinson
  234. ~~~~~~~~
  235. Projection designed to make global maps "look right". Set the central
  236. longitude and width, e.g.,
  237. ::
  238. gmt basemap -Rd -JN0/8i -Bafg -B+tRobinson -pdf robinson
  239. Winkel Tripel
  240. ~~~~~~~~~~~~~
  241. Yet another projection typically used for global maps only. You can set
  242. the central longitude, e.g.,
  243. ::
  244. gmt basemap -R90/450/-90/90 -JR270/25c -Bafg -B+t"Winkel Tripel" -pdf winkel
  245. Mollweide [equal-area]
  246. ~~~~~~~~~~~~~~~~~~~~~~
  247. The Mollweide projection is also mostly used for global maps and thus
  248. the spherical form is used. To get a 25-cm-wide world map centered on
  249. the Dateline:
  250. ::
  251. basemap -Rg -JW180/25c -Bafg -B+tMollweide -pdf mollweide
  252. Van der Grinten
  253. ~~~~~~~~~~~~~~~
  254. The Van der Grinten projection is also mostly used for global maps and
  255. thus the spherical form is used. To get a 18-cm-wide world map centered on the Dateline:
  256. ::
  257. gmt basemap -Rg -JV180/18c -Bafg -B+t"Van der Grinten" -pdf grinten
  258. Arbitrary rotation
  259. ~~~~~~~~~~~~~~~~~~
  260. If you need to plot a map but have it rotated about a vertical axis then
  261. use the **-p** option. For instance, to rotate the basemap below 90
  262. degrees about an axis centered on the map, try
  263. ::
  264. gmt basemap -R10/40/10/40 -JM10c -Bafg -B+t"I am rotated" -p90+w25/25 -Xc -pdf rotated
  265. .. include:: basemap_notes.rst_
  266. See Also
  267. --------
  268. :doc:`gmt`, :doc:`gmt.conf`, :doc:`gmtcolors`
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...