-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[ENH]: fill_between invert? #23768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the suggestions. This is more complex than it may sound. The "outside" area is vertically unbounded. We don't have |
Thank you for your reply. How about using the y limits of the axes as a boundary? Is there some way to keep track of them if they change? |
I think we want a polygon where you can specify each point in a different coordinate system (aka transform) as what you really want for outer edges is a blended (data, axes) coordinate system and for the "inner" points you want a pure-data coordinate system. https://matplotlib.org/stable/api/_as_gen/matplotlib.patches.ConnectionPatch.html sort of does this, but only for two points |
@tacaswell maybe we should phrase this differently. In your proposal we'd need not only a different coordinate system per point, but per coordinate (x in data, y in axes). I'm not convinced we need this generality however. It may be simpler to regard the required Artist more like a line segment, which is extended to an "area" by going vertically/horizontally to +/-infinity. |
Hello, @Kevin1212918 @antarapal235 @jasonper0042 @ShakthiAngou and I are planning on working on this issue for a software engineering class. |
Problem
It would be nice if matplotlib's fill_between could fill the regions below two intersecting lines and above both lines. It can fill between both lines, but I haven't found a simple way to invert the region obtained previously. The only workarounds I have are to create some extra functions, or to swap foreground and background, both of which are cumbersome. There is a related issue with figures and code on stackoverflow: https://stackoverflow.com/questions/73447993/matplotlib-fill-between-invert
Proposed solution
Adding a boolean "invert" argument to fill_between would be nice
The text was updated successfully, but these errors were encountered: