Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
[ENH] Implement dynamic clipping to axes limits for 3D plots#27349
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
74a0810
to6bed144
Compare490ad58
tob73d8dc
Compare674235d
tofaf74b6
Comparescottshambaugh commentedNov 27, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
TODO:
|
faf74b6
to7b9bb21
Compareb2a9978
tobe117e7
Compare857252a
to8931e3a
Compare
I don't think that's the case; we can definitely clip partial lines or patches to the Axes. Unless you mean the 3D renderer? In that case, you would have to do some magic to calculate the clipping path of the Axes3D box with the artist in flattened 2D space, and apply it with |
bcb8a41
to7506e37
CompareThank you for the review@QuLogic! I believe all your comments are addressed now |
The docs build error is unrelated:
|
7506e37
toc52b9a0
CompareI think that the docs error isn't actually generic, will investigate. |
The missing reference handler is now a bit more specific about these things, so if you've added/removed some lines in a docstring, you may have to update the line numbers in the json file to get it to skip again. |
scottshambaugh commentedAug 24, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This is a rather confusing error. It traces back to matplotlib/doc/missing-references.json Lines 301 to 329 inb01462c
... but I did add 3 lines to the
|
It's not complaining about Also, I just noticed this looking at other arguments, but |
@QuLogic I'm not seeing this error on local docs builds. Do you know of another way to track it down? |
Make axlim_clip flag keyword onlyUpdatestest imagetest image restore
d1c41de
toee9f0a9
Compare70c8344
to439841a
CompareImplement dynamic clipping to axes box for 3D plotsMake axlim_clip flag keyword onlyUpdatestest imagetest image restoreImplement dynamic clipping to axes box for 3D plotsMake axlim_clip flag keyword onlyUpdatestest imagetest image restoreImplement dynamic clipping to axes box for 3D plotsMake axlim_clip flag keyword onlyUpdatestest imagetest image restoreCode review comments on 3D axlim clippingCode review comments on 3D axlim clipping
439841a
tocc5e8d5
Comparescottshambaugh commentedAug 31, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Ok, fixed the issue with The remaining docs error is an instance of#28744 and is unrelated. @QuLogic I also added in |
9dceafc
intomatplotlib:mainUh oh!
There was an error while loading.Please reload this page.
nbfazel commentedOct 5, 2024
Thank you for addressing this issue! Which version of matplotlib will incorporate the fix? My current version is 3.9.2. |
Hi@nbfazel, this will be out in the future 3.10 release. |
nbfazel commentedOct 6, 2024
Thank you! |
Uh oh!
There was an error while loading.Please reload this page.
Closes#25804
PR summary
This PR introduces "dynamic clipping" of the data in 3D plots, such that data outside the axis limits is not shown. I did a deep dive into stackoverflow and found 12 separate questions asking for this sort of functionality (see that list inthis comment).
All 3D plotting functions now support the
axlim_clip
keyword argument (defaultFalse
), which whenTrue
will clip the data to the axes view limits, hiding all data outside those bounds. This clipping will be dynamically applied in real time while panning and zooming.Please note that if one vertex of a line segment or 3D patch is clipped, the entire segment or patch will be hidden. Not being able to show partial lines or patches such that they are "smoothly" cut off at the boundaries of the view box is a limitation of the current renderer.
What's new and new gallery example image (I'm not in love with this example, but it'll do for now):
Video of the dynamic behavior, please excuse my sluggish machine:
2023-11-25.22-47-45-1.mp4
PR checklist