matplotlib rotate and shift x label code example Example: matplotlib x label rotation plt.xticks(rotation=45)