Open jorisvandenbossche opened 5 years ago
I agree, more than for consistency was done to be able to fully split the matplotlib code into a separate module (without doing too many tricky things).
I'm unsure whether registering converters is useful for any backend, and it may makes sense to simply change the name of the function. Or if users should call the function directly from the backend (the backend is currently private pandas.plotting._matplotlib
, so this would probably require making it public).
This is being discussed in #26747
I personally don't think it makes sense for backends to have this (and if they have something similar, I don't think it should necessarily be exposed through pandas).
I wouldn't move the public API, the public name already has "matplotlib" in it, so it is rather clear it is for the matplotlib backend.
With the recent plotting backend refactor, the
pandas.plotting.register_matplotlib_converters
is now referring to the "general"register
which calls the plotting backend, instead of just being the matplotlib register function.It probably doesn't make much sense to expose this through the plotting backend? It is maybe done for consistency (everything goes through the plotting backend, also internally), but personally I found this indirection confusing when looking at the source code (for this case).
cc @datapythonista