-1
Use the function xticks
to rotate x-axis texts, passing the degree of inclination as a parameter rotation
.
Example rotating 45°:
import matplotlib.pyplot as plt
plt.bar(['teste 1', 'teste 2', 'teste 3'], [20, 30, 50])
plt.xticks(rotation=45)
plt.show()
It worked out! Thank you
– Lers