plt.xticks(rotation=45) printing text code example Example: rotate axis labels matplotlib plt.xticks(rotation=90)