plt x label rotation code example
Example 1: matplotlib x label rotation
plt.xticks(rotation=45)
Example 2: rotate axis labels matplotlib
plt.xticks(rotation=90)
Example 3: matplotlib axis rotate xticks
ax.tick_params(axis='x', rotation=45)
plt.xticks(rotation=45)
plt.xticks(rotation=90)
ax.tick_params(axis='x', rotation=45)