Skip to content

Commit e1d7452

Browse files
Apply suggestions from code review
Co-authored-by: Dongdong Tian <[email protected]>
1 parent 82d57f3 commit e1d7452

File tree

3 files changed

+18
-22
lines changed

3 files changed

+18
-22
lines changed

examples/gallery/lines/hlines_vlines.py

+12-16
Original file line numberDiff line numberDiff line change
@@ -64,24 +64,22 @@
6464
fig = pygmt.Figure()
6565

6666
fig.basemap(region="g", projection="R15c", frame=["+thlines geographic", "af"])
67-
# Add a horizontal line at a latitude of 70°N without specifying longitude limits
67+
# Add a horizontal line at 70°N
6868
fig.hlines(y=70, pen="1.5p,red3", label="Line 1")
69-
# Add a line at a latitude of 50°N with longitude limits at 20°E and 160°E
69+
# Add a horizontal line at 50°N with longitude limits at 20°E and 160°E
7070
fig.hlines(y=50, xmin=20, xmax=160, pen="1.5p,dodgerblue3", label="Line 2")
71-
# Add a horizontal line at a latitude of 30°S with longitude limits at 60°E
72-
# and 270°E
71+
# Add a horizontal line at 30°S with longitude limits at 60°E and 270°E
7372
fig.hlines(y=-30, xmin=60, xmax=270, pen="1.5p,gray30,-", label="Line 3")
7473
fig.legend()
7574

7675
fig.shift_origin(xshift="w+2c")
7776

7877
fig.basemap(region="g", projection="R15c", frame=["+tvlines geographic", "af"])
79-
# Add a vertical line at a longitude of 70°E without specifying latitude limits
78+
# Add a vertical line at 70°E
8079
fig.vlines(x=70, pen="1.5p,red3", label="Line 1")
81-
# Add a vertical line at a longitude of 120°E with latitude limits at 50°S and 70°N
80+
# Add a vertical line at 20°E with latitude limits at 50°S and 70°N
8281
fig.vlines(x=120, ymin=-50, ymax=70, pen="1.5p,dodgerblue3", label="Line 2")
83-
# Add a vertical line at a longitude of 230°E with latitude limits at 70°S
84-
# and 80°N
82+
# Add a vertical line at 230°E with latitude limits at 70°S and 80°N
8583
fig.vlines(x=230, ymin=-70, ymax=80, pen="1.5p,gray30,-", label="Line 3")
8684
fig.legend()
8785

@@ -97,24 +95,22 @@
9795
fig = pygmt.Figure()
9896

9997
fig.basemap(region=[0, 360, 0, 1], projection="P10c", frame=["+thlines polar", "af"])
100-
# Add a horizontal line along a radius of 0.8 without specifying azimuth limits
98+
# Add a horizontal line along radius=0.8
10199
fig.hlines(y=0.8, pen="1.5p,red3", label="Line 1")
102-
# Add a horizontal line along a radius of 0.5 with azimuth limits at 30° and 160°
100+
# Add a horizontal line along radius=0.5 with azimuth limits at 30° and 160°
103101
fig.hlines(y=0.5, xmin=30, xmax=160, pen="1.5p,dodgerblue3", label="Line 2")
104-
# Add a horizontal line along a radius of 0.25 with azimuth limits at 60°
105-
# and 270°
102+
# Add a horizontal line along radius=0.25 with azimuth limits at 60° and 270°
106103
fig.hlines(y=0.25, xmin=60, xmax=270, pen="1.5p,gray30,-", label="Line 3")
107104
fig.legend()
108105

109106
fig.shift_origin(xshift="w+2c")
110107

111108
fig.basemap(region=[0, 360, 0, 1], projection="P10c", frame=["+tvlines polar", "af"])
112-
# Add a vertical line along at an azimuth of 120° without specifying radius limits
109+
# Add a vertical line along azimuth=120°
113110
fig.vlines(x=120, pen="1.5p,red3", label="Line 1")
114-
# Add a vertical line along at an azimuth of 190° with radius limits at 0.2 and 0.8
111+
# Add a vertical line along azimuth=190° with radius limits at 0.2 and 0.8
115112
fig.vlines(x=190, ymin=0.2, ymax=0.8, pen="1.5p,dodgerblue3", label="Line 2")
116-
# Add a vertical line along at an azimuth of 320° with radius limits at 0.5
117-
# and 0.9
113+
# Add a vertical line along azimuth=320 with radius limits at 0.5 and 0.9
118114
fig.vlines(x=320, ymin=0.5, ymax=0.9, pen="1.5p,gray30,-", label="Line 3")
119115
fig.legend()
120116

pygmt/src/hlines.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ def hlines(
3838
The term "horizontal" lines can be interpreted differently in different coordinate
3939
systems:
4040
41-
- **Cartesian** coordinate system: lines are plotted as straight lines.
42-
- **Polar** projection: lines are plotted as arcs along a constant radius.
43-
- **Geographic** projection: lines are plotted along parallels (constant latitude).
41+
- **Cartesian**: lines are plotted as straight lines.
42+
- **Polar**: lines are plotted as arcs along a constant radius.
43+
- **Geographic**: lines are plotted along parallels (constant latitude).
4444
4545
Parameters
4646
----------

pygmt/src/vlines.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ def vlines(
3838
The term "vertical" lines can be interpreted differently in different coordinate
3939
systems:
4040
41-
- **Cartesian** coordinate system: lines are plotted as straight lines.
42-
- **Polar** projection: lines are plotted as straight lines along radius.
43-
- **Geographic** projection: lines are plotted along meridians (constant longitude).
41+
- **Cartesian**: lines are plotted as straight lines.
42+
- **Polar**: lines are plotted as straight lines along radius.
43+
- **Geographic**: lines are plotted along meridians (constant longitude).
4444
4545
Parameters
4646
----------

0 commit comments

Comments
 (0)