xxxxxxxxxx
xticks(rotation=45) # rotate x-axis labels by 45 degrees.
yticks(rotation=90) # rotate y-axis labels by 90 degrees.
xxxxxxxxxx
import matplotlib.pyplot as plt
# Your existing code for creating the plot
# Rotate the x-axis labels
plt.xticks(rotation='vertical')
# Display the plot
plt.show()