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

plot.rst 4.3 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
  1. .. index:: ! plot
  2. .. include:: module_core_purpose.rst_
  3. ****
  4. plot
  5. ****
  6. |plot_purpose|
  7. Synopsis
  8. --------
  9. .. include:: common_SYN_OPTs.rst_
  10. **gmt plot** [ *table* ] |-J|\ *parameters*
  11. |SYN_OPT-Rz|
  12. [ |-A|\ [**m**\|\ **p**\|\ **x**\|\ **y**] ]
  13. [ |SYN_OPT-B| ]
  14. [ |-C|\ *cpt* ]
  15. [ |-D|\ *dx*/*dy* ]
  16. [ |-E|\ [**x**\|\ **y**\|\ **X**\|\ **Y**][**+a**][**+cl**\|\ **f**][**+n**][**+w**\ *cap*][**+p**\ *pen*] ]
  17. [ |-F|\ [**c**\|\ **n**\|\ **r**][**a**\|\ **f**\|\ **s**\|\ **r**\|\ *refpoint*] ]
  18. [ |-G|\ *fill*\|\ **+z** ]
  19. [ |-I|\ [*intens*] ]
  20. [ |-L|\ [**+b**\|\ **d**\|\ **D**][**+xl**\|\ **r**\|\ *x0*][**+yl**\|\ **r**\|\ *y0*][**+p**\ *pen*] ]
  21. [ |-N|\ [**c**\|\ **r**] ]
  22. [ |-S|\ [*symbol*][*size* ]
  23. [ |-T| ]
  24. [ |SYN_OPT-U| ]
  25. [ |SYN_OPT-V| ]
  26. [ |-W|\ [*pen*][*attr*] ]
  27. [ |SYN_OPT-X| ]
  28. [ |SYN_OPT-Y| ]
  29. [ |-Z|\ *value*\|\ *file*]
  30. [ |SYN_OPT-a| ]
  31. [ |SYN_OPT-bi| ]
  32. [ |SYN_OPT-di| ]
  33. [ |SYN_OPT-e| ]
  34. [ |SYN_OPT-f| ]
  35. [ |SYN_OPT-g| ]
  36. [ |SYN_OPT-h| ]
  37. [ |SYN_OPT-i| ]
  38. [ |SYN_OPT-l| ]
  39. [ |SYN_OPT-p| ]
  40. [ |SYN_OPT-qi| ]
  41. [ |SYN_OPT-t| ]
  42. [ |SYN_OPT-:| ]
  43. [ |SYN_OPT--| ]
  44. .. include:: plot_common.rst_
  45. Examples
  46. --------
  47. .. include:: explain_example.rst_
  48. .. include:: oneliner_info.rst_
  49. To plot solid red circles (diameter = 0.2 cm) at the positions listed
  50. in the remote file DSDP.txt on a Mercator map at 0.3 cm/degree of the area 100E to
  51. 160E, 20S to 30N, with automatic tick-marks and gridlines, use
  52. ::
  53. gmt plot @DSDP.txt -R100/160/-20/30 -Jm0.3c -Sc0.2c -Gred -Bafg -pdf map
  54. To plot the xyz values in the file quakes.xyzm as circles with size
  55. given by the magnitude in the 4th column and color based on the depth in
  56. the third using the CPT rgb.cpt on a linear map, use
  57. ::
  58. gmt plot quakes.xyzm -R0/1000/0/1000 -JX6i -Sc -Crgb -B200 -pdf map
  59. To plot the file trench.txt on a Mercator map, with white triangles with
  60. sides 0.25 inch on the left side of the line, spaced every 0.8 inch, use
  61. ::
  62. gmt plot trench.txt -R150/200/20/50 -Jm0.15i -Sf0.8i/0.1i+l+t -Gwhite -W -B10 -pdf map
  63. To plot a circle with color dictated by the *t.cpt* file for the *z*-value 65, try
  64. ::
  65. echo 175 30 | gmt plot -R150/200/20/50 -JM15c -B -Sc0.5c -Z65 -Ct.cpt -G+z -pdf map
  66. To plot the data in the file misc.txt as symbols determined by the code in
  67. the last column, and with size given by the magnitude in the 4th column,
  68. and color based on the third column via the CPT chrome on a
  69. linear map, use
  70. ::
  71. gmt plot misc.txt -R0/100/-50/100 -JX6i -S -Cchrome -B20 -pdf map
  72. If you need to place vectors on a plot you can choose among
  73. straight Cartesian vectors, math circular vectors, or geo-vectors (these
  74. form small or great circles on the Earth). These can have optional heads at either
  75. end, and heads may be the traditional arrow, a circle, or a terminal cross-line.
  76. To place a few vectors with
  77. a circle at the start location and an arrow head at the end, try
  78. ::
  79. gmt plot -R0/50/-50/50 -JX6i -Sv0.15i+bc+ea -Gyellow -W0.5p -Baf -pdf map << EOF
  80. 10 10 45 2i
  81. 30 -20 0 1.5i
  82. EOF
  83. To plot vectors (red vector heads, solid stem) from the file data.txt that contains
  84. record of the form lon, lat, dx, dy, where dx, dy are the Cartesian
  85. vector components given in user units, and these user units should be converted
  86. to cm given the scale 3.60, try
  87. ::
  88. gmt plot -R20/40/-20/0 -JM6i -Sv0.15i+e+z3.6c -Gred -W0.25p -Baf data.txt -pdf map
  89. .. include:: plot_notes.rst_
  90. .. include:: auto_legend_info.rst_
  91. See Also
  92. --------
  93. :doc:`gmt`, :doc:`gmt.conf`,
  94. :doc:`gmtcolors`,
  95. :doc:`basemap`, :doc:`plot3d`
  96. .. ------------------------------------- Examples per option -------------------
  97. .. |ex_OPT-L| raw:: html
  98. <a href="#openModal">Example</a>
  99. <div id="openModal" class="modalDialog">
  100. <div>
  101. <a href="#close" title="Close" class="close">X</a>
  102. <h2>-L example</h2>
  103. <p>
  104. cat << EOF > t.txt</br>
  105. 1 1</br>
  106. 2 3</br>
  107. 3 2</br>
  108. 4 4</br>
  109. EOF</br>
  110. gmt begin filler pdf</br>
  111. gmt plot -R0/5/0/5 -JX3i -B t.txt -Gred -W2p -L+yb</br>
  112. gmt plot -B t.txt -Gred -W2p -L+yt -X3.25i</br>
  113. gmt plot -B t.txt -Gred -W2p -L+xl -X-3.25i -Y3.25i</br>
  114. gmt plot -B t.txt -Gred -W2p -L+xr -X3.25i</br>
  115. gmt plot -B t.txt -Gred -W2p -L+y4 -X-3.25i -Y3.25i</br>
  116. gmt plot -B t.txt -Gred -W2p -L+x4.5 -X3.25i</br>
  117. gmt end show</br>
  118. </p>
  119. </div>
  120. </div>
Tip!

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

Comments

Loading...