2808 explained code solutions for 75 technologies


python-matplotlibHow to rotate y axis labels (ticks)


import matplotlib.pyplot as plt

plt.plot([2,1,3])
plt.tick_params(axis='y', labelrotation=90)
plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities

.plot(

plot specified data

tick_params

set axis tick labels params

axis='y'

we want to update configuration for y axis only

labelrotation

sets rotation for tick labels (degrees)

.show()

render chart in a separate window