Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a6b42cb

Browse filesBrowse files
committed
update FAQ on how to register pandas converters
`pandas.tseries.converter` no longer exists, and the individual converters are not part of the public API so this change updates the documentation to reflect how to properly register the pandas converters with matplotlib.
1 parent c080824 commit a6b42cb
Copy full SHA for a6b42cb

File tree

Expand file treeCollapse file tree

1 file changed

+5
-13
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-13
lines changed

‎doc/faq/howto_faq.rst

Copy file name to clipboardExpand all lines: doc/faq/howto_faq.rst
+5-13Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,12 @@ Plot `numpy.datetime64` values
2121
As of Matplotlib 2.2, `numpy.datetime64` objects are handled the same way
2222
as `datetime.datetime` objects.
2323

24-
If you prefer the pandas converters and locators, you can register their
25-
converter with the `matplotlib.units` module::
26-
27-
from pandas.tseries import converter as pdtc
28-
pdtc.register()
29-
30-
If you only want to use the `pandas` converter for `numpy.datetime64` values ::
31-
32-
from pandas.tseries import converter as pdtc
33-
import matplotlib.units as munits
34-
import numpy as np
35-
36-
munits.registry[np.datetime64] = pdtc.DatetimeConverter()
24+
If you prefer the pandas converters and locators, you can register them. This
25+
is done automatically when calling a pandas plot function and may be
26+
unnecessary when using pandas instead of Matplotlib directly. ::
3727

28+
from pandas.plotting import register_matplotlib_converters
29+
register_matplotlib_converters()
3830

3931

4032
.. _howto-figure-empty:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.