move x-axis label to top of figure in matplotlib
July 15th, 2011 by Lawrence David
to move your x-axis label to the top of the figure:
ax.xaxis.tick_top()
July 15th, 2011 by Lawrence David
to move your x-axis label to the top of the figure:
ax.xaxis.tick_top()
This moves the ticks only.
To move the label as well, it looks like you need to do:
`ax.xaxis.set_label_position(“top”)`
Sorry, yours does move the tick labels. What I added was to move the Axis label.
Either way, thanks for posting it!