@@ -14,31 +14,28 @@ Restore Matplotlib datetime Converter Registration
14
14
15
15
Pandas implements some matplotlib converters for nicely formatting the axis
16
16
labels on plots with ``datetime`` or ``Period`` values. Prior to pandas 0.21.0,
17
- these were implicitly registered with matplotlib, as a side effect of
18
- ``import pandas``. In pandas 0.21.0, we required users to explicitly register
19
- the converter.
17
+ these were implicitly registered with matplotlib, as a side effect of ``import
18
+ pandas``.
20
19
21
- .. code-block:: python
20
+ In pandas 0.21.0, we required users to explicitly register the
21
+ converter. This caused problems for some users who relied on those converters
22
+ being present for regular ``matplotlib.pyplot`` plotting methods, so we're
23
+ temporarily reverting that change; pandas will again register the converters on
24
+ import.
22
25
23
- >>> from pandas.plotting import register_matplotlib_converters
24
- >>> register_matplotlib_converters()
25
-
26
- This caused problems for some users who relied on those converters being present
27
- for regular ``matplotlib.pyplot`` plotting methods, so we're temporarily
28
- reverting that change; pandas will again register the converters on import.
29
- Pandas plotting functions, such as ``Series.plot``, will continue to register
30
- them for you.
31
-
32
- We've added a new option to control the converters,
26
+ We've added a new option to control the converters:
33
27
``pd.options.plotting.matplotlib.register_converters``. By default, they are
34
28
registered. Toggling this to ``False`` removes pandas' formatters and restore
35
29
any converters we overwrote when registering them (:issue:`18301`).
36
30
37
31
We're working with the matplotlib developers to make this easier. We're trying
38
32
to balance user convenience (automatically registering the converters) with
39
33
import performance and best practices (importing pandas shouldn't have the side
40
- effect of overwriting any custom converters you've already set). Apologies for
41
- any bumps along the way.
34
+ effect of overwriting any custom converters you've already set). In the future
35
+ we hope to have most of the datetime formatting functionality in matplotlib,
36
+ with just the pandas-specific converters in pandas. We'll then gracefully
37
+ deprecate the automatic registration of converters in favor of users explicitly
38
+ registering them when they want them.
42
39
43
40
.. _whatsnew_0211.enhancements:
44
41
0 commit comments