-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Pandas hexbin plot lacks X axis labels in IPython Notebook #8653
Comments
I have reproduced it with IPython master (is that correct that I need jupyter/notebook to run the notebook server?). {'commit_hash': u'3e49b3c',
'commit_source': 'installation',
'default_encoding': 'UTF-8',
'ipython_path': '/home/lev/test_venv/lib/python2.7/site-packages/IPython',
'ipython_version': '4.0.0-dev',
'os_name': 'posix',
'platform': 'Linux-4.0.7-2-ARCH-x86_64-with-glibc2.2.5',
'sys_executable': '/home/lev/test_venv/bin/python2',
'sys_platform': 'linux2',
'sys_version': '2.7.10 (default, May 26 2015, 04:16:29) \n[GCC 5.1.0]'} And here's the whole notebook. |
What's the pandas version? Could this be something that has changed in pandas? |
Pandas version is |
It must be notebook related, but it might be something in pandas or mpl that is just triggered by the notebook. @jreback, @tacaswell, any idea what might cause the X-axis labels and tick labels to go missing like this? |
Another thing: the labels don't disappear with |
That is odd... x, y = np.random.randn(2, 122)
fig, ax = plt.subplots()
hx = ax.hexbin(x, y, cmap='Greens', gridsize=10)
fig.colorbar(hx)
plt.show() works correctly in the notebook with both |
Yes, it only happens when called from |
I'm seeing this problem as well with python 2.7, pandas 0.16.2.dev, and ipython version 3.1.0. Looking to the documentation for pandas.DataFrame.plot, the only reference to the x labels and ticks being invisible is in the sharex option. So, I manually set sharex=False (which it should have been by default), and poof, the xlabel and xticks appeared. Hopefully this helps tracking down the bug. |
Thanks @BDannowitz . That makes it sound like there's an issue in pandas - does someone want to file an issue there? You can reference this issue for background. |
Closing as it appears to be a pandas bug. Anyone who's still seeing it, follow along with pandas-dev/pandas#10678. |
When using
pandas.DataFrame.plot()
withkind='hexbin'
, the resulting plot sometimes has no X tick labels and on X axis label. This is observed in IPython Notebook (ipython version 3.2.0) with Python 3.4,matplotlib
1.4.3, with%pylab --no-import-all inline
.The same code produces a correct plot in IPython terminal on the same setup, with
%pylab --no-import-all
. This happens only on some dataframes, here's the code I run:Here's the
df
:And here's the
example.csv
file used. The plot from the Notebook is below. Also, here is another fellow with the same problem.The text was updated successfully, but these errors were encountered: