Fix/mpl37 compat
This was reported via https://github.com/matplotlib/matplotlib/issues/25538 , I can not find an issue if @ocefpaf reported one.

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [n/a] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [n/a] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

> I can not find an issue if @ocefpaf reported one.

I was going to do it today. You were too fast :-)

Thanks @tacaswell! Thanks @tacaswell 

BTW, we have a branch trying to support Matplotlib 3.7 but we don't really have experienced matplotlib contributors anymore. Any insights would be appreciated: https://github.com/pandas-dev/pandas/pull/51990 @meeseeksdev backport 2.0.x