ax.tick_params(axis='x', rotation=45)
# rotate xticks of a plot Matplotlib angle = 90 plt.xticks(rotation=angle)