Skip to content

Add gallery example showing how to fill the area between two curves#3168

Merged
seisman merged 26 commits intomainfrom
add-gallery-area-curves
Apr 16, 2026
Merged

Add gallery example showing how to fill the area between two curves#3168
seisman merged 26 commits intomainfrom
add-gallery-area-curves

Conversation

@yvonnefroehlich
Copy link
Copy Markdown
Member

@yvonnefroehlich yvonnefroehlich commented Apr 14, 2024

Description of proposed changes

This PR is converted to draft as a high-level method is planned for fill the area between two curves

-M of plot allows to fill the area between two curves with colors or patterns. This PR addes a gallery example showing how to do this:

Preview: https://pygmt-dev--3168.org.readthedocs.build/en/3168/gallery/lines/curves_area.html

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash command is:

  • /format: automatically format and lint the code

@yvonnefroehlich yvonnefroehlich added the documentation Improvements or additions to documentation label Apr 14, 2024
@yvonnefroehlich yvonnefroehlich added this to the 0.12.0 milestone Apr 14, 2024
@yvonnefroehlich yvonnefroehlich self-assigned this Apr 14, 2024
@yvonnefroehlich yvonnefroehlich changed the title Add gallery example showing how to fill the area between two curves WIP: Add gallery example showing how to fill the area between two curves Apr 14, 2024
@yvonnefroehlich
Copy link
Copy Markdown
Member Author

/format

@seisman
Copy link
Copy Markdown
Member

seisman commented Apr 9, 2026

Perhaps we should continue this tutorial, considering that it will definitely take some time to implement the Figure.fill_between method.

@yvonnefroehlich
Copy link
Copy Markdown
Member Author

Perhaps we should continue this tutorial, considering that it will definitely take some time to implement the Figure.fill_between method.

Sounds good. But need to finish PR #3169 to add an alias for -M first.

@yvonnefroehlich yvonnefroehlich changed the title WIP: Add gallery example showing how to fill the area between two curves Add gallery example showing how to fill the area between two curves Apr 10, 2026
@yvonnefroehlich yvonnefroehlich marked this pull request as ready for review April 10, 2026 09:42
Comment thread examples/gallery/lines/curves_area.py Outdated
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Comment thread examples/gallery/lines/curves_area.py Outdated
Comment thread examples/gallery/lines/curves_area.py Outdated
yvonnefroehlich and others added 2 commits April 10, 2026 12:11
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Comment thread examples/gallery/lines/curves_area.py Outdated
yvonnefroehlich and others added 2 commits April 10, 2026 12:14
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@seisman seisman added this to the 0.19.0 milestone Apr 10, 2026
@yvonnefroehlich yvonnefroehlich added needs review This PR has higher priority and needs review. and removed needs review This PR has higher priority and needs review. labels Apr 10, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Sphinx-Gallery example demonstrating how to fill the area between two curves using the fill_between alias for GMT’s plot -M option, including variants with curve outlines and comparison against a constant y-level.

Changes:

  • Introduce a new gallery example showing Figure.plot(fill_between=...) with separate fills/legend labels for the two regions.
  • Add follow-up examples demonstrating drawing both curves and filling relative to a horizontal reference line.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread examples/gallery/lines/curves_area.py Outdated
Comment thread examples/gallery/lines/curves_area.py Outdated
Comment thread examples/gallery/lines/curves_area.py Outdated
Comment thread examples/gallery/lines/curves_area.py Outdated
Comment thread examples/gallery/lines/fill_areas_between_curves.py
@seisman seisman added the final review call This PR requires final review and approval from a second reviewer label Apr 16, 2026
Comment thread examples/gallery/lines/fill_areas_between_curves.py
Comment thread examples/gallery/lines/fill_areas_between_curves.py
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Apr 16, 2026
@seisman seisman merged commit aae4caf into main Apr 16, 2026
8 checks passed
@seisman seisman deleted the add-gallery-area-curves branch April 16, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants