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