IIUC (a big if), we allow users to plot multiple objects on the same figure by passing an ax
argument to plotting methods. I think this is part/all of the reason why we need all the statefulness in #54485.
What if we deprecate that argument, so all obj.plot(...)
calls get a new ax
object? Would that break any use cases we really care about? Would it allow us to simplify the code enough to make it actually maintainable?
Comment From: jbrockmendel
Or is the ax they get somehow a global in matplotlib?
Comment From: jbrockmendel
cc @jreback might understand the code and the stakes
Comment From: mroeschke
We do demonstrate passing in ax
in https://pandas.pydata.org/docs/user_guide/visualization.html#using-layout-and-targeting-multiple-axes, but I'm not sure significantly different (or meaningful) than specifying the subplot-creating arguments into the .plot
API.