Skip to content

BUG: Hexbin plots does not display x label and xtick labels in pandas 1.3.3 #44050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 of 3 tasks
stelios-c opened this issue Oct 16, 2021 · 2 comments · Fixed by #60253
Closed
2 of 3 tasks

BUG: Hexbin plots does not display x label and xtick labels in pandas 1.3.3 #44050

stelios-c opened this issue Oct 16, 2021 · 2 comments · Fixed by #60253
Assignees
Labels
Bug Needs Tests Unit test(s) needed to prevent regressions Visualization plotting
Milestone

Comments

@stelios-c
Copy link

stelios-c commented Oct 16, 2021

  • 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

import pandas as pd
import numpy as np
df = pd.DataFrame(np.random.rand(1000, 2), columns=['a', 'b'])
df.plot.hexbin(x='a', y='b');
#thanks @rabernat

Issue Description

Hexbin plots does not display x label and xtick labels. This has been a bug in the past, see closed issue #10678 , it must have been fixed with #20446 and must have been introduced again later.

Expected Behavior

Expect to see 'a' as the x label and numbers under the x axis ticks. This is only achievable with workaround:

import pandas as pd
import numpy as np
df = pd.DataFrame(np.random.rand(1000, 2), columns=['a', 'b'])
df.plot.hexbin(x='a', y='b',sharex=False);

Installed Versions

INSTALLED VERSIONS

commit : 73c6825
python : 3.7.10.final.0
python-bits : 64
OS : Linux
OS-release : 4.19.0-18-cloud-amd64
Version : #1 SMP Debian 4.19.208-1 (2021-09-29)
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8

pandas : 1.3.3
numpy : 1.19.5
pytz : 2021.3
dateutil : 2.8.2
pip : 21.2.4
setuptools : 58.2.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.2
IPython : 7.28.0
pandas_datareader: None
bs4 : None
bottleneck : 1.3.2
fsspec : 2021.10.0
fastparquet : None
gcsfs : 2021.10.0
matplotlib : 3.4.3
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 5.0.0
pyxlsb : None
s3fs : None
scipy : 1.7.1
sqlalchemy : 1.4.25
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : 0.54.1

@stelios-c stelios-c added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 16, 2021
@mroeschke mroeschke added Visualization plotting and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 30, 2021
@lithomas1
Copy link
Member

This looks fixed now (I have pandas main branch and matplotlib 3.7.1). Could use a test.

@lithomas1 lithomas1 added the Needs Tests Unit test(s) needed to prevent regressions label Jun 4, 2023
@jasonmokk
Copy link
Contributor

take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Tests Unit test(s) needed to prevent regressions Visualization plotting
Projects
None yet
5 participants