Add Figure.fill_between to fill between two curves#4679
Open
seisman wants to merge 2 commits into
Open
Conversation
45 tasks
Contributor
Summary of changed imagesThis is an auto-generated report of images that have changed on the DVC remote
Image diff(s)DetailsAdded images
Modified images
Report last updated at commit f555308 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR provides an initial implementation for the
Figure.fill_betweenmethod, which fills the area between two curves.The two curves are called y1 and y2 in the docstring. Curve y1 is specified via x/y, and curve 2 is specified via x/y2. Therefore, the two curves must be co-registered. Supporting for curves that are not co-registered can be done by adding a separate parameter
x2, which can be done in a future PR.This PR mainly wraps the
plot's-Moption. Core options include:-W:pen-G:fill-l:label-M+g:fill2fill for y2>y1+l:label2label for y2 curve+p:pen2pen for y2 curve+r: draw legend entries as lines, rather than filled boxes [it may contains bugs]+y: y2 is a horizontal constant, i.e., y2=0An working example
Address #4678
Preview: https://pygmt-dev--4679.org.readthedocs.build/en/4679/api/generated/pygmt.Figure.fill_between.html