Closed
Description
Bug summary
While running image tests for yt, I noticed a change of behaviour that bisects to
2357c92d87d96d519c8470776e76180e71663d0b (PR #22587)
and that I'm not 100% sure is intentional, where parameters set with Axis.tick_params
are forgotten after a call to Axes.cla
.
In yt we use persistent Axis
instances inside container classes; we typically set some tick_params
during instantiation of the container, and defer rendering as much as possible, at which point Axis
instances may be cleared before the plot is drawn again.
I think this can easily be fixed in yt, but I wanted to check with you wether this change was intented or not.
Code for reproduction
import matplotlib as mpl
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.tick_params(which="both", axis="both", direction="in", top=True, right=True)
ax.cla()
fig.savefig(f"/tmp/{mpl.__version__}.png")
Actual outcome
Expected outcome
Additional information
No response
Operating system
N/A
Matplotlib Version
3.6 VS 3.5
Matplotlib Backend
MacOSX (but also seeing this on a Linux CI server)
Python version
3.10.4
Jupyter version
N/A
Installation
pip