You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MNT: Remove AxesStack and deprecated behavior of reuse of existing axes with same arguments #18832
In Matplotlib 2.1, the behavior of reusing existing axes when created with the same arguments was deprecated (see #9037). The request is to finally remove this behavior.
IIRC I kind of gave up on that due to unclearness of what we want to keep supporting, e.g. wrt. gca(projection=..., ...) (#10700) (which goes through the same AxesStack info). Probably you need to make some executive decisions on that :)
I am personally fine with fully deprecating all kwargs to gca(), but there was some pushback wrt. subplot() in #12513 (and IIRC these basically go through the same machinery) and I had little interest in fighting that fight, which is why I decided to let @tacaswell decide :)
Activity
tacaswell commentedon Oct 28, 2020
@anntzer do you already have a branch for this?
anntzer commentedon Oct 28, 2020
IIRC I kind of gave up on that due to unclearness of what we want to keep supporting, e.g. wrt.
gca(projection=..., ...)(#10700) (which goes through the same AxesStack info). Probably you need to make some executive decisions on that :)lpsinger commentedon Nov 1, 2020
@anntzer, after studying #10700, my suggestion is:
gca()gca()and alsosubplots(), etc.)gca()is called without kwargs, simply return the current axesgca()kwargs matches the kwargs of the current axes, return those axes, otherwise raise an exceptiongca()What do you think?
anntzer commentedon Nov 1, 2020
I am personally fine with fully deprecating all kwargs to gca(), but there was some pushback wrt. subplot() in #12513 (and IIRC these basically go through the same machinery) and I had little interest in fighting that fight, which is why I decided to let @tacaswell decide :)
lpsinger commentedon Nov 8, 2020
@tacaswell, what do you think? I am happy to take a stab at the above changes, if you agree with the approach.
lpsinger commentedon Nov 18, 2020
How do we want to handle a call to gca() without kwargs when there are not yet any axes? Return None? Or return a new axes?
anntzer commentedon Nov 18, 2020
That should definitely return a new axes (I'd guess that's an extremely common use case (like it or not)).
MNT: Remove deprecated axes kwargs collision detection
MNT: Remove deprecated axes kwargs collision detection
MNT: Remove deprecated axes kwargs collision detection
MNT: Remove deprecated axes kwargs collision detection
MNT: Remove deprecated axes kwargs collision detection
MNT: Remove deprecated axes kwargs collision detection
MNT: Remove deprecated axes kwargs collision detection
MNT: Remove deprecated axes kwargs collision detection
MNT: Remove deprecated axes kwargs collision detection
MNT: Remove deprecated axes kwargs collision detection
MNT: Remove deprecated axes kwargs collision detection
MNT: Remove deprecated axes kwargs collision detection
MNT: Remove deprecated axes kwargs collision detection
MNT: Remove deprecated axes kwargs collision detection
MNT: Remove deprecated axes kwargs collision detection
MNT: Remove deprecated axes kwargs collision detection
MNT: Remove deprecated axes kwargs collision detection
MNT: Remove deprecated axes kwargs collision detection
Require matplotlib >= 3.4.0
Require matplotlib >= 3.4.0