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
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample, a copy-pastable example
importpandasaspdimportnumpyasnpdf=pd.DataFrame(
{
'a': np.random.randint(100, size=100),
'b': np.random.randint(100, size=100),
'c': pd.date_range(start='1/1/2018', periods=100, freq='s'),
}
)
axs=df.set_index(df['c'] +pd.to_timedelta(df['b'], unit='ms')).drop(columns='c').plot(subplots=True)
#[ax.minorticks_off() for ax in axs] # note uncomment this to work around issue
Problem description
When using DataFrame.plot with subplots=True, extra tick marks appear on the x axis.
Expected Output
No extra ticks. Uncomment the line above to get the below:
Output of pd.show_versions()
INSTALLED VERSIONS
commit : 9d598a5
python : 3.9.1.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.17763
machine : AMD64
processor : Intel64 Family 6 Model 142 Stepping 12, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : English_United States.1252
@simonjayhawkins Would appreciate your advice on this! Since the issue seems to be coming from the logic in matplotlib library, should this issue be opened in matplotlib and we try to fix it there, rather than inside pandas?
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample, a copy-pastable example
Problem description
When using
DataFrame.plot
withsubplots=True
, extra tick marks appear on the x axis.Expected Output
No extra ticks. Uncomment the line above to get the below:
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : 9d598a5
python : 3.9.1.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.17763
machine : AMD64
processor : Intel64 Family 6 Model 142 Stepping 12, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : English_United States.1252
pandas : 1.2.1
numpy : 1.19.5
pytz : 2020.5
dateutil : 2.8.1
pip : 20.3.3
setuptools : 49.6.0.post20210108
Cython : None
pytest : 6.2.1
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : 7.18.1
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.3.3
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: