| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| self.stale = True | ||
| for k in self.spines.keys(): | ||
| self.spines[k].set_visible(False) | ||
|
|
There was a problem hiding this comment.
to be pedantic, this should be done prior to setting the stale flag to True.
Sorry, something went wrong.
There was a problem hiding this comment.
Ooops. I meant to remove that anyhow..
Sorry, something went wrong.
There was a problem hiding this comment.
Seems reasonable to me. I'd like @WeatherGod to click the green button, though.
Sorry, something went wrong.
|
I'll admit I'm a little unclear what ax.set_axisoff is supposed to do versus the spines being marked not visible. It's possible that the proper fix is in axes/_base.py but I hesitated because ax.set_axisoff would wipe out any user customization of the spine visibility. The other possible fix is for ax.get_tightbbox to check if axison, and pull any spines out of the artist tree if its off. But that seems fiddly. Frankly, I'm not quite sure why the spines are separate artists from the axis objects. It would seem to me they should be children artists of axis, and then axis could return the correct bbox. |
Sorry, something went wrong.
|
ping @WeatherGod if you have a minute |
Sorry, something went wrong.
|
A long time ago, what appeared as spines used to be a part of the axis (they weren't called that back then), but then we transitioned over to this spines implementation that allowed for all sorts of neat and useful graphs. I think we made them children of axes because it simplified the API that way, but I don't remember for sure. I think the transition was around v1.0 or v1.1? |
Sorry, something went wrong.
There was a problem hiding this comment.
Yeah, this makes sense in general, just concerned about computation costs.
Sorry, something went wrong.
FIX: remove visible logic from _base.py FIX: also exclued spines tight layout
…241-on-v3.0.x Backport PR #12241 on branch v3.0.x (FIX: make unused spines invisible)
| Back | FazBrowse Home | New Git URL |
PR Summary
Closes #12239
mplot3d turned axis off but for whatever reason the spines were still created, and were marked as visible, so get_tightbbox included their nonsense extents in its calculations. This change just makes the spines not be visible.
PR Checklist