Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Closed
Description
I am testing matplotlib 2.2rc from a point of view of "what if pandas no longer registers its unit converters", and one of the issues raised when we temporarily did that for the 0.21.0 release was the following (pandas-dev/pandas#18283):
Code for reproduction
importpandasaspdimportmatplotlib.pyplotaspltpd.plotting.deregister_matplotlib_converters()xticks=pd.date_range(start="10/10/2017",end="11/11/2017",freq='D')plt.xticks(xticks,xticks.strftime("%a %m-%d"))
Actual outcome
The above raisesTypeError: Cannot compare type 'Timestamp' with type 'float', because Timestamps are not recognized to use theDateConverter in the units framework.
Would it be possible to consider adding pandas Timestamps to the unit registry? It are subclasses ofdatetime.datetime, so code-wise it should not be hard to add support.
Matplotlib version
- Operating system: Linux
- Matplotlib version: '2.2.0rc1'
- Python version: 3.5