Skip to content

Commit 897c7ea

Browse files
committed
Doc update
1 parent 1112b28 commit 897c7ea

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

doc/source/whatsnew/v0.21.1.txt

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,28 @@ Restore Matplotlib datetime Converter Registration
1414

1515
Pandas implements some matplotlib converters for nicely formatting the axis
1616
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``.
2019

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.
2225

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:
3327
``pd.options.plotting.matplotlib.register_converters``. By default, they are
3428
registered. Toggling this to ``False`` removes pandas' formatters and restore
3529
any converters we overwrote when registering them (:issue:`18301`).
3630

3731
We're working with the matplotlib developers to make this easier. We're trying
3832
to balance user convenience (automatically registering the converters) with
3933
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.
4239

4340
.. _whatsnew_0211.enhancements:
4441

0 commit comments

Comments
 (0)