-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Axes3d
attaches itself to a figure, where as Axes
does not
#18364
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
Cartopy |
git blame says that line has been there for at least 10 years. This might very well be the case where we used to do this for regular 2D axes, but no longer? Also, there were a lot of oddities with the original Axes3D design 10 years ago that required an inordinate amount of hacks to get it to work. When I revamped it for v1.1.0, I trashed a lot of those hacks and simplified the conceptual model. It very well could be that I simply just missed this. |
Heh, just realized that this potentially might explain an old "double-draw" bug... |
Thats exactly how I found it - I added a new double-draw bug in #18356 by storing the axes in a flat list instead of an I actually don't mind the idea that an axes attaches itself on instantiation - after all they require a |
👍 to making the two consistent. I'm just not sure what the ramifications are of making |
Right now |
Ah, right, I think I am starting to remember now. Originally, Axes3D took
up the entire available space because it didn't need to make space for the
axes labels. That ended up changing in v1.1 or v1.2 (iirc) so that it
follows the typical conventions of being a subaxes object under the hood
and had to accept the same hspace/wspace values as everyone else.
We still technically support adding a regular Axes object to a figure
without it being managed by a stack or whatever it was before we had the
stack (gridspec?).
…On Thu, Aug 27, 2020 at 10:15 PM Jody Klymak ***@***.***> wrote:
Right now fig.add_axes(ax) only works if ax was created via Axes(fig,...),
otherwise it explicitly errors out. So, is there a case where we would
create an axes on a figure but *not* want to also add it to the axes
stack?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#18364 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACHF6DJOZOKLQYJTYGOS3LSC4HKZANCNFSM4QNETDYA>
.
|
I guess you could just add an axes as an artist w/ |
Closed by #19496, afaict. |
returns a list with no axes....
For 3-d
has the axes attached:
Axes3D.__init__
explicitly adds itself to its parent:matplotlib/lib/mpl_toolkits/mplot3d/axes3d.py
Line 139 in c035f66
whereas no such thing happens for the base
Axes
class.Discovered as part of #18356, but discussing here because its orthogonal. But I think the behaviour here should be the same .
The text was updated successfully, but these errors were encountered: