Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Milestone
Description
Summary
As discussed on today's call.
We need to codify whatax.clear
andplt.cla
are meant to actually clear on an axes, versus setting on the axes that should remain static.
For instance, it is pretty straight forward that clearing an axes should remove any data artists from the plot. However, what other properties should be reset. Labels? Tick styling, grids? Units on axes? Locators and formatters? The scale of the axises?
If anyone with edit access wants, they should start a list here, or if folks don't have edit access they can add list items on the comments.
Crossref:#23808
More reference from@timhoffm (#23808 (review)):
- KeyError: 'gridOn' in axis.py when axis.tick_params() is used with reset = True #20149 is the original issue, that started everything
- Fix resetting grid visibility #20161 was the bugfix for above (v3.4.2)
- resulting in regressionsax.clear() adds extra ticks, un-hides shared-axis tick labels #20721 andRegression: undocumented change of behaviour in mpl 3.4.2 with axis ticks direction #20219.
- these were hot-fixed inFix clear of Axes that are shared. #20826 (v3.4.3)
- Refactor handling of tick and ticklabel visibility in Axis.clear() #22587 (v3.6.0) claims to be a follow-up cleanup which claims to not change the outcome, but apparently we did not have enough tests.
Proposed fix
No response