From 2841904950291c7fbb49c91796d8ef218137f08f Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 14 Apr 2024 21:40:43 +0200 Subject: [PATCH 01/19] Add first version of curves_area galley example --- examples/gallery/lines/curves_area.py | 59 +++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100755 examples/gallery/lines/curves_area.py diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/curves_area.py new file mode 100755 index 00000000000..ec1b7d03af4 --- /dev/null +++ b/examples/gallery/lines/curves_area.py @@ -0,0 +1,59 @@ +""" +Area between curves +------------------- +Using the ``M`` parameter of the :meth:`pygmt.Figure.plot` method it is possible +to fill the area between two curves y_1 and y_2 with color. Different fills (colors +or patterns) can be used for the areas y_1 > y_2 and y_1 < y_2. Optionally, the +curves can be drawn. +""" + +# %% +import numpy as np +import pandas as pd +import pygmt as gmt + +# ----------------------------------------------------------------------------- +# Generate some test data and create a pandas DataFrame +x = np.arange(-10, 10.2, 0.1) +y1 = np.sin(x * 3) +y2 = np.sin(x / 2) + +data = np.array([x, y1, y2]) +data_tp = data.transpose() + +data_df = pd.DataFrame(data_tp, columns=["x", "y1", "y2"]) + +# ----------------------------------------------------------------------------- +# Set up new Figure instance +fig = gmt.Figure() +fig.basemap(region=[-10, 10, -5, 5], projection="X15c/5c", frame=True) + +fig.plot( + data=data_df, + fill="orange", + M="c+gsteelblue+lshort < long", + label="short > long", +) + +fig.legend() + +fig.show() + + +# %% +# Additionally we can draw the curves. + +# Set up new Figure instance +fig = gmt.Figure() +fig.basemap(region=[-10, 10, -5, 5], projection="X15c/5c", frame=True) + +fig.plot( + data=data_df, + fill="p8", + pen="1p,black,solid", + M="c+gp17+p1p,black,dashed", +) + +fig.show() + +# sphinx_gallery_thumbnail_number = 1 From 8a854754fa351973515429e8a9141a6338162337 Mon Sep 17 00:00:00 2001 From: actions-bot <58130806+actions-bot@users.noreply.github.com> Date: Sun, 14 Apr 2024 20:07:50 +0000 Subject: [PATCH 02/19] [format-command] fixes --- examples/gallery/lines/curves_area.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 examples/gallery/lines/curves_area.py diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/curves_area.py old mode 100755 new mode 100644 From 0ff0c1935f75bdbae810d2b1049aa8ce7c14e517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Fri, 10 Apr 2026 11:30:07 +0200 Subject: [PATCH 03/19] Use new parameter name --- examples/gallery/lines/curves_area.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/curves_area.py index ec1b7d03af4..8d10760e1b0 100644 --- a/examples/gallery/lines/curves_area.py +++ b/examples/gallery/lines/curves_area.py @@ -1,9 +1,9 @@ """ Area between curves ------------------- -Using the ``M`` parameter of the :meth:`pygmt.Figure.plot` method it is possible -to fill the area between two curves y_1 and y_2 with color. Different fills (colors -or patterns) can be used for the areas y_1 > y_2 and y_1 < y_2. Optionally, the +Using the ``fill_between`` parameter of the :meth:`pygmt.Figure.plot` method it is +possible to fill the area between two curves y1 and y2 with color. Different fills +(colors or patterns) can be used for the areas y1 > y2 and y1 < y2. Optionally, the curves can be drawn. """ @@ -31,7 +31,7 @@ fig.plot( data=data_df, fill="orange", - M="c+gsteelblue+lshort < long", + fill_between="c+gsteelblue+lshort < long", label="short > long", ) @@ -51,7 +51,7 @@ data=data_df, fill="p8", pen="1p,black,solid", - M="c+gp17+p1p,black,dashed", + fill_between="c+gp17+p1p,black,dashed", ) fig.show() From 9548c89f4aeecee6adc47d4a8f7f348e3dcba21c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Fri, 10 Apr 2026 12:00:28 +0200 Subject: [PATCH 04/19] Simply creating of pandas dataframe Co-authored-by: Dongdong Tian --- examples/gallery/lines/curves_area.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/curves_area.py index 8d10760e1b0..1ae46dd0c8b 100644 --- a/examples/gallery/lines/curves_area.py +++ b/examples/gallery/lines/curves_area.py @@ -18,11 +18,7 @@ y1 = np.sin(x * 3) y2 = np.sin(x / 2) -data = np.array([x, y1, y2]) -data_tp = data.transpose() - -data_df = pd.DataFrame(data_tp, columns=["x", "y1", "y2"]) - +data_df = pd.DataFrame({"x": x, "y1": y1, "y2": y2}) # ----------------------------------------------------------------------------- # Set up new Figure instance fig = gmt.Figure() From 7b179aa82c1277efd3fb4f262a53f8121b1dcf9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Fri, 10 Apr 2026 12:11:31 +0200 Subject: [PATCH 05/19] Adjust intro text --- examples/gallery/lines/curves_area.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/curves_area.py index 1ae46dd0c8b..c42c4b804eb 100644 --- a/examples/gallery/lines/curves_area.py +++ b/examples/gallery/lines/curves_area.py @@ -2,9 +2,9 @@ Area between curves ------------------- Using the ``fill_between`` parameter of the :meth:`pygmt.Figure.plot` method it is -possible to fill the area between two curves y1 and y2 with color. Different fills -(colors or patterns) can be used for the areas y1 > y2 and y1 < y2. Optionally, the -curves can be drawn. +possible to fill the area between two curves y1 and y2. Different fills (colors or +patterns) can be used for the areas y1 > y2 and y1 < y2. Optionally, the curves can +be drawn. """ # %% From aee5fbf555a5a6b7a7b979082bee6eee8e41d82c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Fri, 10 Apr 2026 12:13:23 +0200 Subject: [PATCH 06/19] Improve title Co-authored-by: Dongdong Tian --- examples/gallery/lines/curves_area.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/curves_area.py index c42c4b804eb..61597fcc457 100644 --- a/examples/gallery/lines/curves_area.py +++ b/examples/gallery/lines/curves_area.py @@ -1,6 +1,6 @@ """ -Area between curves -------------------- +Fill Area between curves +------------------------ Using the ``fill_between`` parameter of the :meth:`pygmt.Figure.plot` method it is possible to fill the area between two curves y1 and y2. Different fills (colors or patterns) can be used for the areas y1 > y2 and y1 < y2. Optionally, the curves can From 1ee9c2751a1e53aa3bf4237f9ab3cde004cfa398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Fri, 10 Apr 2026 12:14:03 +0200 Subject: [PATCH 07/19] Fix typo --- examples/gallery/lines/curves_area.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/curves_area.py index 61597fcc457..6c4dbceae35 100644 --- a/examples/gallery/lines/curves_area.py +++ b/examples/gallery/lines/curves_area.py @@ -1,5 +1,5 @@ """ -Fill Area between curves +Fill area between curves ------------------------ Using the ``fill_between`` parameter of the :meth:`pygmt.Figure.plot` method it is possible to fill the area between two curves y1 and y2. Different fills (colors or From 8ddc317482817682df5c5c15174f734c15f0634b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Fri, 10 Apr 2026 12:14:25 +0200 Subject: [PATCH 08/19] Remove seperation line Co-authored-by: Dongdong Tian --- examples/gallery/lines/curves_area.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/curves_area.py index 6c4dbceae35..ff4c67b1e01 100644 --- a/examples/gallery/lines/curves_area.py +++ b/examples/gallery/lines/curves_area.py @@ -19,8 +19,6 @@ y2 = np.sin(x / 2) data_df = pd.DataFrame({"x": x, "y1": y1, "y2": y2}) -# ----------------------------------------------------------------------------- -# Set up new Figure instance fig = gmt.Figure() fig.basemap(region=[-10, 10, -5, 5], projection="X15c/5c", frame=True) From 784bcfcbf032e5cfe94f2285a3126a32bdd07879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Fri, 10 Apr 2026 12:17:50 +0200 Subject: [PATCH 09/19] Improve structure --- examples/gallery/lines/curves_area.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/curves_area.py index ff4c67b1e01..f5adca6f60f 100644 --- a/examples/gallery/lines/curves_area.py +++ b/examples/gallery/lines/curves_area.py @@ -12,13 +12,17 @@ import pandas as pd import pygmt as gmt -# ----------------------------------------------------------------------------- # Generate some test data and create a pandas DataFrame x = np.arange(-10, 10.2, 0.1) y1 = np.sin(x * 3) y2 = np.sin(x / 2) data_df = pd.DataFrame({"x": x, "y1": y1, "y2": y2}) + + +# %% +# Fill the area between the two curves using the ``fill_between`` parameter. + fig = gmt.Figure() fig.basemap(region=[-10, 10, -5, 5], projection="X15c/5c", frame=True) From 805f0d6321a1231fdc1f6daea239d0c85eec7dc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Fri, 10 Apr 2026 16:56:07 +0200 Subject: [PATCH 10/19] Extend intro text --- examples/gallery/lines/curves_area.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/curves_area.py index f5adca6f60f..92101c06946 100644 --- a/examples/gallery/lines/curves_area.py +++ b/examples/gallery/lines/curves_area.py @@ -5,6 +5,9 @@ possible to fill the area between two curves y1 and y2. Different fills (colors or patterns) can be used for the areas y1 > y2 and y1 < y2. Optionally, the curves can be drawn. +To plot an anomaly along a track use :meth:`pygmt.Figure.grdlandmask` and see the +gallery example :doc:`Wiggle along tracks `. + """ # %% From 629f5b80c7830e45ff0bcfca8de65ebca70e4e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Fri, 10 Apr 2026 17:33:12 +0200 Subject: [PATCH 11/19] Add comparision with horizontal line via +y - similar to wiggle --- examples/gallery/lines/curves_area.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/curves_area.py index 92101c06946..6cdc492b10c 100644 --- a/examples/gallery/lines/curves_area.py +++ b/examples/gallery/lines/curves_area.py @@ -7,7 +7,6 @@ be drawn. To plot an anomaly along a track use :meth:`pygmt.Figure.grdlandmask` and see the gallery example :doc:`Wiggle along tracks `. - """ # %% @@ -57,4 +56,21 @@ fig.show() + +# %% +# Compare to a horizontal line. + +# Set up new Figure instance +fig = gmt.Figure() +fig.basemap(region=[-10, 10, -5, 5], projection="X15c/5c", frame=True) + +fig.plot( + data=data_df[["x", "y1"]], + fill="p8", + pen="1p,black,solid", + fill_between="c+gp17+p1p,black,dashed+y0.42", +) + +fig.show() + # sphinx_gallery_thumbnail_number = 1 From 0b222b5d84b32cb487459bc37da64f0b0539b139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Fri, 10 Apr 2026 17:54:12 +0200 Subject: [PATCH 12/19] Add comments --- examples/gallery/lines/curves_area.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/curves_area.py index 6cdc492b10c..33c10791227 100644 --- a/examples/gallery/lines/curves_area.py +++ b/examples/gallery/lines/curves_area.py @@ -23,7 +23,11 @@ # %% -# Fill the area between the two curves using the ``fill_between`` parameter. +# Fill the areas between the two curves using the ``fill_between`` parameter. +# Use the ``fill`` parameter and the modifier **+g** for ``fill_between`` to +# set different fills for areas with y1 > y2 and y2 < y1, respectively. Use +# the ``label`` parameter and the modifier **+l** for ``fill_between`` to +# set the corresponding legend entries. fig = gmt.Figure() fig.basemap(region=[-10, 10, -5, 5], projection="X15c/5c", frame=True) @@ -31,8 +35,8 @@ fig.plot( data=data_df, fill="orange", - fill_between="c+gsteelblue+lshort < long", label="short > long", + fill_between="c+gsteelblue+lshort < long", ) fig.legend() @@ -41,9 +45,10 @@ # %% -# Additionally we can draw the curves. +# Additionally to filling the areas, we can draw the curves. Use the ``pen`` +# parameter and the modifier **+p** for ``fill_between`` to set different +# lines for the two curves y1 and y2, respectively. -# Set up new Figure instance fig = gmt.Figure() fig.basemap(region=[-10, 10, -5, 5], projection="X15c/5c", frame=True) @@ -58,9 +63,9 @@ # %% -# Compare to a horizontal line. +# To compare a curve y1 to a horizontal line, append **+y** to ``fill_between`` +# and give the desired y-level. -# Set up new Figure instance fig = gmt.Figure() fig.basemap(region=[-10, 10, -5, 5], projection="X15c/5c", frame=True) @@ -68,6 +73,7 @@ data=data_df[["x", "y1"]], fill="p8", pen="1p,black,solid", + # Define a horizontal line at y=0.42 fill_between="c+gp17+p1p,black,dashed+y0.42", ) From 83d458df6f6034b84117ce595dc73920b74295a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Wed, 15 Apr 2026 21:23:29 +0200 Subject: [PATCH 13/19] Fix title underline Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- examples/gallery/lines/curves_area.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/curves_area.py index 33c10791227..2dc29c77b0d 100644 --- a/examples/gallery/lines/curves_area.py +++ b/examples/gallery/lines/curves_area.py @@ -1,6 +1,6 @@ """ Fill area between curves ------------------------- +======================== Using the ``fill_between`` parameter of the :meth:`pygmt.Figure.plot` method it is possible to fill the area between two curves y1 and y2. Different fills (colors or patterns) can be used for the areas y1 > y2 and y1 < y2. Optionally, the curves can From 32533894bd08bb07120a09d04cdb503d413c4a32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Wed, 15 Apr 2026 21:27:47 +0200 Subject: [PATCH 14/19] Fix typo in method name --- examples/gallery/lines/curves_area.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/curves_area.py index 2dc29c77b0d..16fadfd6a2b 100644 --- a/examples/gallery/lines/curves_area.py +++ b/examples/gallery/lines/curves_area.py @@ -5,8 +5,8 @@ possible to fill the area between two curves y1 and y2. Different fills (colors or patterns) can be used for the areas y1 > y2 and y1 < y2. Optionally, the curves can be drawn. -To plot an anomaly along a track use :meth:`pygmt.Figure.grdlandmask` and see the -gallery example :doc:`Wiggle along tracks `. +To plot an anomaly along a track use :meth:`pygmt.Figure.wiggle` and see the gallery +example :doc:`Wiggle along tracks `. """ # %% From fdb7661a2c194c7ebb3b3392a1029e9e9aa571ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Wed, 15 Apr 2026 21:28:58 +0200 Subject: [PATCH 15/19] Fix typo in comparison --- examples/gallery/lines/curves_area.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/curves_area.py index 16fadfd6a2b..171f85d19c3 100644 --- a/examples/gallery/lines/curves_area.py +++ b/examples/gallery/lines/curves_area.py @@ -25,7 +25,7 @@ # %% # Fill the areas between the two curves using the ``fill_between`` parameter. # Use the ``fill`` parameter and the modifier **+g** for ``fill_between`` to -# set different fills for areas with y1 > y2 and y2 < y1, respectively. Use +# set different fills for areas with y1 > y2 and y1 < y2, respectively. Use # the ``label`` parameter and the modifier **+l** for ``fill_between`` to # set the corresponding legend entries. From d13ca93d6606c8c03f9f4e9d934ac6c9e17776f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Wed, 15 Apr 2026 21:29:57 +0200 Subject: [PATCH 16/19] Do not import pygmt as gmt --- examples/gallery/lines/curves_area.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/curves_area.py index 171f85d19c3..6783fc368a0 100644 --- a/examples/gallery/lines/curves_area.py +++ b/examples/gallery/lines/curves_area.py @@ -12,7 +12,7 @@ # %% import numpy as np import pandas as pd -import pygmt as gmt +import pygmt # Generate some test data and create a pandas DataFrame x = np.arange(-10, 10.2, 0.1) @@ -29,7 +29,7 @@ # the ``label`` parameter and the modifier **+l** for ``fill_between`` to # set the corresponding legend entries. -fig = gmt.Figure() +fig = pygmt.Figure() fig.basemap(region=[-10, 10, -5, 5], projection="X15c/5c", frame=True) fig.plot( @@ -49,7 +49,7 @@ # parameter and the modifier **+p** for ``fill_between`` to set different # lines for the two curves y1 and y2, respectively. -fig = gmt.Figure() +fig = pygmt.Figure() fig.basemap(region=[-10, 10, -5, 5], projection="X15c/5c", frame=True) fig.plot( @@ -66,7 +66,7 @@ # To compare a curve y1 to a horizontal line, append **+y** to ``fill_between`` # and give the desired y-level. -fig = gmt.Figure() +fig = pygmt.Figure() fig.basemap(region=[-10, 10, -5, 5], projection="X15c/5c", frame=True) fig.plot( From 02db5eed80d2f4ea60b469f565b91da71f2683d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Wed, 15 Apr 2026 21:31:10 +0200 Subject: [PATCH 17/19] Fix grammar --- examples/gallery/lines/curves_area.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/curves_area.py index 6783fc368a0..b69c898d02c 100644 --- a/examples/gallery/lines/curves_area.py +++ b/examples/gallery/lines/curves_area.py @@ -45,7 +45,7 @@ # %% -# Additionally to filling the areas, we can draw the curves. Use the ``pen`` +# In addition to filling the areas, we can draw the curves. Use the ``pen`` # parameter and the modifier **+p** for ``fill_between`` to set different # lines for the two curves y1 and y2, respectively. From cddc4b94dff418e74e3233711e32a1e59178f901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Thu, 16 Apr 2026 10:10:01 +0200 Subject: [PATCH 18/19] Rewrapp to 88 chars --- examples/gallery/lines/curves_area.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/curves_area.py index b69c898d02c..0b270aac158 100644 --- a/examples/gallery/lines/curves_area.py +++ b/examples/gallery/lines/curves_area.py @@ -3,8 +3,8 @@ ======================== Using the ``fill_between`` parameter of the :meth:`pygmt.Figure.plot` method it is possible to fill the area between two curves y1 and y2. Different fills (colors or -patterns) can be used for the areas y1 > y2 and y1 < y2. Optionally, the curves can -be drawn. +patterns) can be used for the areas y1 > y2 and y1 < y2. Optionally, the curves can be +drawn. To plot an anomaly along a track use :meth:`pygmt.Figure.wiggle` and see the gallery example :doc:`Wiggle along tracks `. """ @@ -23,11 +23,10 @@ # %% -# Fill the areas between the two curves using the ``fill_between`` parameter. -# Use the ``fill`` parameter and the modifier **+g** for ``fill_between`` to -# set different fills for areas with y1 > y2 and y1 < y2, respectively. Use -# the ``label`` parameter and the modifier **+l** for ``fill_between`` to -# set the corresponding legend entries. +# Fill the areas between the two curves using the ``fill_between`` parameter. Use the +# ``fill`` parameter and the modifier **+g** for ``fill_between`` to set different fills +# for areas with y1 > y2 and y1 < y2, respectively. Use the ``label`` parameter and the +# modifier **+l** for ``fill_between`` to set the corresponding legend entries. fig = pygmt.Figure() fig.basemap(region=[-10, 10, -5, 5], projection="X15c/5c", frame=True) @@ -45,9 +44,9 @@ # %% -# In addition to filling the areas, we can draw the curves. Use the ``pen`` -# parameter and the modifier **+p** for ``fill_between`` to set different -# lines for the two curves y1 and y2, respectively. +# In addition to filling the areas, we can draw the curves. Use the ``pen`` parameter +# and the modifier **+p** for ``fill_between`` to set different lines for the two +# curves y1 and y2, respectively. fig = pygmt.Figure() fig.basemap(region=[-10, 10, -5, 5], projection="X15c/5c", frame=True) @@ -63,8 +62,8 @@ # %% -# To compare a curve y1 to a horizontal line, append **+y** to ``fill_between`` -# and give the desired y-level. +# To compare a curve y1 to a horizontal line, append **+y** to ``fill_between`` and give +# the desired y-level. fig = pygmt.Figure() fig.basemap(region=[-10, 10, -5, 5], projection="X15c/5c", frame=True) From eb2881027fc3f0c09ee68f1faefff69c6814425c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Thu, 16 Apr 2026 10:11:31 +0200 Subject: [PATCH 19/19] Make file name more descriptive --- .../lines/{curves_area.py => fill_areas_between_curves.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename examples/gallery/lines/{curves_area.py => fill_areas_between_curves.py} (100%) diff --git a/examples/gallery/lines/curves_area.py b/examples/gallery/lines/fill_areas_between_curves.py similarity index 100% rename from examples/gallery/lines/curves_area.py rename to examples/gallery/lines/fill_areas_between_curves.py