-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
[ENH]: fill_between extended to 3D #28225
base: main
Are you sure you want to change the base?
Conversation
e59859a
to
6a13037
Compare
The white seams between the patches seems to be an instance of #1188, which I don't see a bug report for in 3D rendering. Is rather annoying but doesn't seem like there are easy fixes. |
6a13037
to
1e7c195
Compare
1e7c195
to
26cbf88
Compare
Note that I decided to not implement the "mode 2" idea in https://github.com/artmenlope/matplotlib-fill_between-in-3D/blob/master/FillBetween3d.py, which concatenates all the points and plots them as one polygon. I think the only benefit is getting rid of the white seams between the patches in the filled flat curves example, but it is degenerate in the general case, and this use case can be handled by users defining their own polygons such as in the new |
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
779b177
to
76eff4a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only doc suggestions.
12ba10d
to
3febc1a
Compare
PR summary
Closes #28142
This extends the 2D
fill_between
method to 3D plots, and IMO works quite nicely. I’m finding it really powerful to generate surfaces easily. Inspired by @artmenlope's solution here: https://github.com/artmenlope/matplotlib-fill_between-in-3D/blob/master/FillBetween3d.pyHere's the what's new image and
fillbetween3d
gallery example:Note that I moved the
poly3d
example https://matplotlib.org/3.9.0/gallery/mplot3d/polys3d.html to a new examplefillunder3d
, to use this new method. Then I made a new example forpoly3d
since adding 3D collections wasn't shown anywhere else afaik.New
fillunder3d
example:New
poly3d
example:PR checklist