I am trying to plot a dataframe as hexbin but can't seem to get the xlabel and x-axis values to plot. The dataframe is as follows:
szen_df.xs('left', level='pos')
and the plot is as follows:
szen_df.xs('left', level='pos').plot(x='szen', y='lat', xlim=(0,90), ylim=(-90,90), kind='hexbin', colormap='Reds' )
with result:
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, and poof, the xlabel and xticks come back.
Clearly this is a bug, but I hope this helps for the time being. I'll add these comments to the bug report that you've already started.
Looks like the same as the issue I had here: matplotlib scatterplot x axis labels
The workaround which worked was to set the axes explicitly. Just leaving this here for the future :)
Might be connected with https://github.com/pandas-dev/pandas/pull/12949 , Open as of now (6th of April 17)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With