From 8b020ce7b708978b0a13e2823a48918b01c07509 Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Mon, 13 Jan 2025 07:33:32 +0100 Subject: [PATCH] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com> Co-authored-by: Dongdong Tian --- examples/gallery/lines/hlines_vlines.py | 22 +++++++++++----------- pygmt/src/hlines.py | 2 +- pygmt/src/vlines.py | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/examples/gallery/lines/hlines_vlines.py b/examples/gallery/lines/hlines_vlines.py index ba4699cf544..5aa25336508 100644 --- a/examples/gallery/lines/hlines_vlines.py +++ b/examples/gallery/lines/hlines_vlines.py @@ -64,22 +64,22 @@ fig = pygmt.Figure() fig.basemap(region="g", projection="R15c", frame=["+tGeographic hlines", "af"]) -# Add a horizontal line at 70°N +# Add a line at 70°N fig.hlines(y=70, pen="1.5p,red3", label="Line 1") -# Add a horizontal line at 50°N with longitude limits at 20°E and 160°E +# Add a line at 50°N with longitude limits at 20°E and 160°E fig.hlines(y=50, xmin=20, xmax=160, pen="1.5p,dodgerblue3", label="Line 2") -# Add a horizontal line at 30°S with longitude limits at 60°E and 270°E +# Add a line at 30°S with longitude limits at 60°E and 270°E fig.hlines(y=-30, xmin=60, xmax=270, pen="1.5p,gray30,-", label="Line 3") fig.legend() fig.shift_origin(xshift="w+2c") fig.basemap(region="g", projection="R15c", frame=["+tGeographic vlines", "af"]) -# Add a vertical line at 70°E +# Add a line at 70°E fig.vlines(x=70, pen="1.5p,red3", label="Line 1") -# Add a vertical line at 20°E with latitude limits at 50°S and 70°N +# Add a line at 20°E with latitude limits at 50°S and 70°N fig.vlines(x=120, ymin=-50, ymax=70, pen="1.5p,dodgerblue3", label="Line 2") -# Add a vertical line at 230°E with latitude limits at 70°S and 80°N +# Add a line at 230°E with latitude limits at 70°S and 80°N fig.vlines(x=230, ymin=-70, ymax=80, pen="1.5p,gray30,-", label="Line 3") fig.legend() @@ -97,20 +97,20 @@ fig.basemap(region=[0, 360, 0, 1], projection="P10c", frame=["+tPolar hlines", "af"]) # Add a line along radius=0.8 fig.hlines(y=0.8, pen="1.5p,red3", label="Line 1") -# Add a horizontal line along radius=0.5 with azimuth limits at 30° and 160° +# Add a line along radius=0.5 with azimuth limits at 30° and 160° fig.hlines(y=0.5, xmin=30, xmax=160, pen="1.5p,dodgerblue3", label="Line 2") -# Add a horizontal line along radius=0.25 with azimuth limits at 60° and 270° +# Add a line along radius=0.25 with azimuth limits at 60° and 270° fig.hlines(y=0.25, xmin=60, xmax=270, pen="1.5p,gray30,-", label="Line 3") fig.legend() fig.shift_origin(xshift="w+2c") fig.basemap(region=[0, 360, 0, 1], projection="P10c", frame=["+tPolar vlines", "af"]) -# Add a vertical line along azimuth=120° +# Add a line along azimuth=120° fig.vlines(x=120, pen="1.5p,red3", label="Line 1") -# Add a vertical line along azimuth=190° with radius limits at 0.2 and 0.8 +# Add a line along azimuth=190° with radius limits at 0.2 and 0.8 fig.vlines(x=190, ymin=0.2, ymax=0.8, pen="1.5p,dodgerblue3", label="Line 2") -# Add a vertical line along azimuth=320 with radius limits at 0.5 and 0.9 +# Add a line along azimuth=320 with radius limits at 0.5 and 0.9 fig.vlines(x=320, ymin=0.5, ymax=0.9, pen="1.5p,gray30,-", label="Line 3") fig.legend() diff --git a/pygmt/src/hlines.py b/pygmt/src/hlines.py index 63516b33bc7..af7c3d8dd35 100644 --- a/pygmt/src/hlines.py +++ b/pygmt/src/hlines.py @@ -40,7 +40,7 @@ def hlines( - **Cartesian**: lines are plotted as straight lines. - **Polar**: lines are plotted as arcs along a constant radius. - - **Geographic**: lines are plotted along parallels (constant latitude). + - **Geographic**: lines are plotted as arcs along parallels (i.e., constant latitude). Parameters ---------- diff --git a/pygmt/src/vlines.py b/pygmt/src/vlines.py index 321528a07f3..7d1f81b57bc 100644 --- a/pygmt/src/vlines.py +++ b/pygmt/src/vlines.py @@ -40,7 +40,7 @@ def vlines( - **Cartesian**: lines are plotted as straight lines. - **Polar**: lines are plotted as straight lines along a constant azimuth. - - **Geographic**: lines are plotted along meridians (constant longitude). + - **Geographic**: lines are plotted as arcs along meridians (i.e., constant longitude). Parameters ----------