-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
No output of xticklabels when plotting to gridspec subplots #10162
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
Comments
Could you give it a shot on a newer version of pandas? All 3 are the same for me (master pandas, matplotlib 1.4.3) |
Thanks! That seems to have solved the problem... pandas 0.16.1 gs = mpl.gridspec.GridSpec(2, 4)
ax1 = plt.subplot(gs[0,:-1])
ax2 = plt.subplot(gs[0,-1])
ax3 = plt.subplot(gs[1,:-2])
ax4 = plt.subplot(gs[1,-2:])
df.A.plot(ax=ax1)
df.B.plot(ax=ax2)
df.C.plot(ax=ax3)
df.D.plot(ax=ax4)
gs.tight_layout(plt.gcf()) |
Maybe we should add a test for this, to ensure this keeps working correctly in the future. |
Interested, yes. But since this is not my daily bread...it might take a while :-) |
That's possible. |
What seems to be the problem here?
The xticklabels for the first axes defined in a gridspec are not visible when plotting with pandas. The corresponding plot using pyplot.plot does have the labels.
pandas 0.16
matplotlib 1.4.3
Matplotlib
pandas
It seems that xticklabels are absent when plotting with pandas to the first axis generated in a gridspec. Switching ax1 and ax2 definition:
pandas
Related?
http://stackoverflow.com/questions/29552382/legend-overriding-x-label-and-x-ticks
The text was updated successfully, but these errors were encountered: