matplotlib rotating x labels code example
Example 1: matplotlib axis rotate xticks
ax.tick_params(axis='x', rotation=45)
Example 2: rotate xticks matplotlib
# rotate xticks of a plot Matplotlib
angle = 90
plt.xticks(rotation=angle)
ax.tick_params(axis='x', rotation=45)
# rotate xticks of a plot Matplotlib
angle = 90
plt.xticks(rotation=angle)