You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For timeseries data, mixed pandas-style (Series.plot(ax=ax)) and pyplot-style (ax.plot()) plotting has different behavior starting in matplotlib==3.4.0. I can't make sense of what's going on, but the difference depends on whether the Series is tz-localized and the frequency of the data. Here are some comparisons using the MRE:
Description
matplotlib==3.3.4
matplotlib==3.4.0
Axes show no lines at all
Axes show line from Series.plot(), but not the ax.errorbar
Both lines display, though the error bar is timeshifted
No apparent difference
Expected Behavior
I suppose I expect to be able to mix and match pandas- and matplotlib-style plotting calls like I can with matplotlib 3.3.4.
Installed Versions
INSTALLED VERSIONS
commit : 66e3805
python : 3.7.7.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19041
machine : AMD64
processor : Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
@kanderso-nrel thanks for the report! I can confirm this still happens on the main branch of pandas as well, and also with the latest matplotlib 3.5.1
cc @QuLogic in case you are aware of similar issues / reports at the matplotlib side, or know what might have caused this (didn't yet further investigate it myself)
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the master branch of pandas.
Reproducible Example
Issue Description
For timeseries data, mixed pandas-style (
Series.plot(ax=ax)
) and pyplot-style (ax.plot()
) plotting has different behavior starting in matplotlib==3.4.0. I can't make sense of what's going on, but the difference depends on whether the Series is tz-localized and the frequency of the data. Here are some comparisons using the MRE:matplotlib==3.3.4
matplotlib==3.4.0
Series.plot()
, but not theax.errorbar
Expected Behavior
I suppose I expect to be able to mix and match pandas- and matplotlib-style plotting calls like I can with matplotlib 3.3.4.
Installed Versions
INSTALLED VERSIONS
commit : 66e3805
python : 3.7.7.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19041
machine : AMD64
processor : Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 1.3.5
numpy : 1.19.5
pytz : 2019.3
dateutil : 2.8.1
pip : 21.3.1
setuptools : 50.3.0
Cython : 0.29.26
pytest : 6.2.3
hypothesis : None
sphinx : 3.2.0
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.31.0
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.4.0
numexpr : 2.7.3
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.5.4
sqlalchemy : None
tables : 3.6.1
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : 0.53.1
The text was updated successfully, but these errors were encountered: