Skip to content
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

hist(by=) breaks when the output does not fill all rows and columns #8256

Closed
CerebralMastication opened this issue Sep 12, 2014 · 7 comments
Closed
Labels
Bug Duplicate Report Duplicate issue or pull request Visualization plotting
Milestone

Comments

@CerebralMastication
Copy link

Example:

import pandas as pd
pd.Series(randn(1000)).hist(by=randint(0, 6, 1000), sharex=True, sharey=True)

pd.Series(randn(1000)).hist(by=randint(0, 5, 1000), sharex=True, sharey=True)

1
2

@jreback
Copy link
Contributor

jreback commented Sep 12, 2014

pls post pd.show_versions()

@CerebralMastication
Copy link
Author

INSTALLED VERSIONS

commit: None
python: 2.7.8.final.0
python-bits: 64
OS: Darwin
OS-release: 13.3.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

pandas: 0.14.1
nose: 1.3.1
Cython: 0.20.2
numpy: 1.8.1
scipy: 0.14.0
statsmodels: 0.5.0
IPython: 2.1.0
sphinx: None
patsy: 0.3.0
scikits.timeseries: None
dateutil: 2.2
pytz: 2014.4
bottleneck: 0.8.0
tables: 3.1.1
numexpr: 2.4
matplotlib: 1.3.1
openpyxl: 1.8.6
xlrd: 0.9.3
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
rpy2: None
sqlalchemy: None
pymysql: None
psycopg2: None

@TomAugspurger
Copy link
Contributor

Looks like the x and ylims aren't being set. Could you check those? I won't be able to look for a couple days.

@onesandzeroes
Copy link
Contributor

I think this is already fixed on master thanks to #8126. The original issue was #7528. On master I get:

ax_lims

I think I only added a test case for boxplots though, so maybe we could add one for histograms?
@CerebralMastication do you want to:

  • Clone the repo and see if the axes are still off when you're running off master
  • Possibly add a test case for this along the same lines as test_boxplot_axis_limits() and submit a pull request?

@CerebralMastication
Copy link
Author

Thanks for checking against master, @onesandzeroes. I'll test as well and then look into the test case. I've not looked at the Pandas code base, so I probably be a bit slow. But it will be a worthwhile exercise for me.

@CerebralMastication
Copy link
Author

I built and installed 0.14.1-430-g35a9527 and can confirm that the issue has been corrected.

@jreback
Copy link
Contributor

jreback commented Sep 15, 2014

@CerebralMastication thanks for checking.!

@jreback jreback closed this as completed Sep 15, 2014
@jreback jreback added Visualization plotting Bug Duplicate Report Duplicate issue or pull request labels Sep 15, 2014
@jreback jreback added this to the 0.15.0 milestone Sep 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Duplicate Report Duplicate issue or pull request Visualization plotting
Projects
None yet
Development

No branches or pull requests

4 participants