ax.set_xticklabels(ax.get_xticklabels() rotation=90) code example Example: rotate axis labels matplotlib plt.xticks(rotation=90)