|
2 | 2 | Polar |
3 | 3 | ===== |
4 | 4 |
|
5 | | -Polar projections allow plotting polar coordinate data (e.g. angle |
6 | | -:math:`\theta` and radius *r*). |
| 5 | +Polar projections allow plotting polar coordinate data (e.g. angle :math:`\theta` and |
| 6 | +radius *r*). |
7 | 7 |
|
8 | 8 | The full syntax for polar projections is: |
9 | 9 |
|
10 | 10 | **P**\ *width*\ [**+a**]\ [**+f**\ [**e**\|\ **p**\|\ *radius*]]\ |
11 | 11 | [**+r**\ *offset*][**+t**\ *origin*][**+z**\ [**p**\|\ *radius*]] |
12 | 12 |
|
13 | 13 | Limits are set via the ``region`` parameter |
14 | | -([*theta_min*, *theta_max*, *radius_min*, *radius_max*]). When using |
15 | | -**P**\ *width* you have to give the *width* of the figure. The lower-case |
16 | | -version **p** is similar to **P** but expects a *scale* instead of |
17 | | -a width (**p**\ *scale*). |
| 14 | +([*theta_min*, *theta_max*, *radius_min*, *radius_max*]). When using **P**\ *width* you |
| 15 | +have to give the *width* of the figure. The lower-case version **p** is similar to **P** |
| 16 | +but expects a *scale* instead of a width (**p**\ *scale*). |
18 | 17 |
|
19 | 18 | The following customizing modifiers are available: |
20 | 19 |
|
21 | | -- **+a**: by default, :math:`\theta` refers to the angle that is equivalent to |
22 | | - a counterclockwise rotation with respect to the east direction (standard |
23 | | - definition); **+a** indicates that the input data are rotated clockwise |
24 | | - relative to the north direction (geographical azimuth angle). |
| 20 | +- **+a**: by default, :math:`\theta` refers to the angle that is equivalent to a |
| 21 | + counterclockwise rotation with respect to the east direction (standard definition); |
| 22 | + **+a** indicates that the input data are rotated clockwise relative to the north |
| 23 | + direction (geographical azimuth angle). |
25 | 24 |
|
26 | | -- **+r**\ *offset*: represents the offset of the r-axis. This modifier allows |
27 | | - you to offset the center of the circle from r=0. |
| 25 | +- **+r**\ *offset*: represents the offset of the r-axis. This modifier allows you to |
| 26 | + offset the center of the circle from r=0. |
28 | 27 |
|
29 | 28 | - **+t**\ *origin*: sets the angle corresponding to the east direction which is |
30 | | - equivalent to rotating the entire coordinate axis clockwise; if the **+a** |
31 | | - modifier is used, setting the angle corresponding to the north direction is |
32 | | - equivalent to rotating the entire coordinate axis counterclockwise. |
| 29 | + equivalent to rotating the entire coordinate axis clockwise; if the **+a** modifier |
| 30 | + is used, setting the angle corresponding to the north direction is equivalent to |
| 31 | + rotating the entire coordinate axis counterclockwise. |
33 | 32 |
|
34 | 33 | - **+f**: reverses the radial direction. |
35 | 34 |
|
36 | | - - Append **e** to indicate that the r-axis is an elevation angle, and the |
37 | | - range of the r-axis should be between 0° and 90°. |
| 35 | + - Append **e** to indicate that the r-axis is an elevation angle, and the range of the |
| 36 | + r-axis should be between 0° and 90°. |
38 | 37 | - Appending **p** sets the current Earth radius (determined by |
39 | | - :gmt-term:`PROJ_ELLIPSOID`) |
40 | | - to the maximum value of the r-axis when the r-axis is reversed. |
| 38 | + :gmt-term:`PROJ_ELLIPSOID`) to the maximum value of the r-axis when the r-axis is |
| 39 | + reversed. |
41 | 40 | - Append *radius* to set the maximum value of the r-axis. |
42 | 41 |
|
43 | | -- **+z**: indicates that the r-axis is marked as depth instead of radius (e.g. |
| 42 | +- **+z**: indicates that the r-axis is marked as depth instead of radius (e.g., |
44 | 43 | *r = radius - z*). |
45 | 44 |
|
46 | 45 | - Append **p** to set radius to the current Earth radius. |
47 | 46 | - Append *radius* to set the value of the radius. |
48 | | -
|
49 | 47 | """ |
50 | 48 |
|
51 | 49 | # %% |
|
56 | 54 | pygmt.config(FONT_TITLE="14p,Courier,black", FORMAT_GEO_MAP="+D") |
57 | 55 |
|
58 | 56 | # ============ |
59 | | -# top left |
| 57 | +# Top left |
60 | 58 | fig.basemap( |
61 | | - # set map limits to theta_min = 0, theta_max = 360, radius_min = 0, |
62 | | - # radius_max = 1 |
| 59 | + # Set map limits to theta_min = 0, theta_max = 360, radius_min = 0, radius_max = 1 |
63 | 60 | region=[0, 360, 0, 1], |
64 | | - # set map width to 5 cm |
| 61 | + # Set map width to 5 cm |
65 | 62 | projection="P5c", |
66 | | - # set the frame and title; @^ allows for a line break within the title |
| 63 | + # Set the frame and title; @^ allows for a line break within the title |
67 | 64 | frame=["xa45f", "+gbisque+tprojection='P5c' @^ region=[0, 360, 0, 1]"], |
68 | 65 | ) |
69 | 66 |
|
70 | | -fig.shift_origin(xshift="8c") |
| 67 | +fig.shift_origin(xshift="w+3c") |
71 | 68 |
|
72 | 69 | # ============ |
73 | | -# top middle |
| 70 | +# Top middle |
74 | 71 | fig.basemap( |
75 | | - # set map limits to theta_min = 0, theta_max = 360, radius_min = 0, |
76 | | - # radius_max = 1 |
| 72 | + # Set map limits to theta_min = 0, theta_max = 360, radius_min = 0, radius_max = 1 |
77 | 73 | region=[0, 360, 0, 1], |
78 | | - # set map width to 5 cm and interpret input data as geographic azimuth |
79 | | - # instead of standard angle |
| 74 | + # Set map width to 5 cm and interpret input data as geographic azimuth instead of |
| 75 | + # standard angle |
80 | 76 | projection="P5c+a", |
81 | | - # set the frame and title; @^ allows for a line break within the title |
| 77 | + # Set the frame and title; @^ allows for a line break within the title |
82 | 78 | frame=["xa45f", "+gbisque+tprojection='P5c+a' @^ region=[0, 360, 0, 1]"], |
83 | 79 | ) |
84 | 80 |
|
85 | | -fig.shift_origin(xshift="8c") |
| 81 | +fig.shift_origin(xshift="w+3c") |
86 | 82 |
|
87 | 83 | # ============ |
88 | | -# top right |
| 84 | +# Top right |
89 | 85 | fig.basemap( |
90 | | - # set map limits to theta_min = 0, theta_max = 90, radius_min = 0, |
91 | | - # radius_max = 1 |
| 86 | + # Set map limits to theta_min = 0, theta_max = 90, radius_min = 0, radius_max = 1 |
92 | 87 | region=[0, 90, 0, 1], |
93 | | - # set map width to 5 cm and interpret input data as geographic azimuth |
94 | | - # instead of standard angle |
| 88 | + # Set map width to 5 cm and interpret input data as geographic azimuth instead of |
| 89 | + # standard angle |
95 | 90 | projection="P5c+a", |
96 | | - # set the frame and title; @^ allows for a line break within the title |
| 91 | + # Set the frame and title; @^ allows for a line break within the title |
97 | 92 | frame=["xa45f", "ya0.2", "WNe+gbisque+tprojection='P5c+a' @^ region=[0, 90, 0, 1]"], |
98 | 93 | ) |
99 | 94 |
|
100 | | -fig.shift_origin(xshift="-16c", yshift="-7c") |
| 95 | +fig.shift_origin(xshift="-2w-6c", yshift="-h-2c") |
101 | 96 |
|
102 | 97 | # ============ |
103 | | -# bottom left |
| 98 | +# Bottom left |
104 | 99 | fig.basemap( |
105 | | - # set map limits to theta_min = 0, theta_max = 90, radius_min = 0, |
106 | | - # radius_max = 1 |
| 100 | + # Set map limits to theta_min = 0, theta_max = 90, radius_min = 0, radius_max = 1 |
107 | 101 | region=[0, 90, 0, 1], |
108 | | - # set map width to 5 cm and interpret input data as geographic azimuth |
109 | | - # instead of standard angle, rotate coordinate system counterclockwise by |
110 | | - # 45 degrees |
| 102 | + # Set map width to 5 cm and interpret input data as geographic azimuth instead of |
| 103 | + # standard angle, rotate coordinate system counterclockwise by 45 degrees |
111 | 104 | projection="P5c+a+t45", |
112 | | - # set the frame and title; @^ allows for a line break within the title |
| 105 | + # Set the frame and title; @^ allows for a line break within the title |
113 | 106 | frame=[ |
114 | 107 | "xa30f", |
115 | 108 | "ya0.2", |
116 | 109 | "WNe+gbisque+tprojection='P5c+a+t45' @^ region=[0, 90, 0, 1]", |
117 | 110 | ], |
118 | 111 | ) |
119 | 112 |
|
120 | | -fig.shift_origin(xshift="8c", yshift="1.3c") |
| 113 | +fig.shift_origin(xshift="w+3c", yshift="1.3c") |
121 | 114 |
|
122 | 115 | # ============ |
123 | | -# bottom middle |
| 116 | +# Bottom middle |
124 | 117 | fig.basemap( |
125 | | - # set map limits to theta_min = 0, theta_max = 90, radius_min = 3480, |
| 118 | + # Set map limits to theta_min = 0, theta_max = 90, radius_min = 3480, |
126 | 119 | # radius_max = 6371 (Earth's radius) |
127 | 120 | region=[0, 90, 3480, 6371], |
128 | | - # set map width to 5 cm and interpret input data as geographic azimuth |
129 | | - # instead of standard angle, rotate coordinate system counterclockwise by |
130 | | - # 45 degrees |
| 121 | + # Set map width to 5 cm and interpret input data as geographic azimuth instead of |
| 122 | + # standard angle, rotate coordinate system counterclockwise by 45 degrees |
131 | 123 | projection="P5c+a+t45", |
132 | | - # set the frame, and title; @^ allows for a line break within the title |
| 124 | + # Set the frame, and title; @^ allows for a line break within the title |
133 | 125 | frame=[ |
134 | 126 | "xa30f", |
135 | 127 | "ya", |
136 | 128 | "WNse+gbisque+tprojection='P5c+a+t45' @^ region=[0, 90, 3480, 6371]", |
137 | 129 | ], |
138 | 130 | ) |
139 | 131 |
|
140 | | -fig.shift_origin(xshift="8c") |
| 132 | +fig.shift_origin(xshift="w+3c") |
141 | 133 |
|
142 | 134 | # ============ |
143 | | -# bottom right |
| 135 | +# Bottom right |
144 | 136 | fig.basemap( |
145 | | - # set map limits to theta_min = 0, theta_max = 90, radius_min = 3480, |
| 137 | + # Set map limits to theta_min = 0, theta_max = 90, radius_min = 3480, |
146 | 138 | # radius_max = 6371 (Earth's radius) |
147 | 139 | region=[0, 90, 3480, 6371], |
148 | | - # set map width to 5 cm and interpret input data as geographic azimuth |
149 | | - # instead of standard angle, rotate coordinate system counterclockwise by |
150 | | - # 45 degrees, r-axis is marked as depth |
| 140 | + # Set map width to 5 cm and interpret input data as geographic azimuth instead of |
| 141 | + # standard angle, rotate coordinate system counterclockwise by 45 degrees, r-axis |
| 142 | + # is marked as depth |
151 | 143 | projection="P5c+a+t45+z", |
152 | | - # set the frame, and title; @^ allows for a line break within the title |
| 144 | + # Set the frame, and title; @^ allows for a line break within the title |
153 | 145 | frame=[ |
154 | 146 | "xa30f", |
155 | 147 | "ya", |
|
0 commit comments