rotate yticks | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

rotate yticks

Using below statement, xticks is by default rotated but how to rotate yticks ? dataframe.plot(rot = 45) In the official document only the folloowing is mentioned but not clearly. rot : int, default None Rotation for ticks (xticks for vertical, yticks for horizontal plots)

1st May 2020, 2:39 PM
harshit
harshit - avatar
1 Answer
+ 1
x=[ s, o, m, e] y=[ v, a, l, s] matplotlib.pyplot(x, y) matplotlib.pyplot.xticks(rotation =45) matplotlib.pyplot.yticks( rotation=45) matplotlib.pyplot.show() now both thicks are rotated by 45 degrees.
9th May 2020, 10:43 AM
Stefan Kothaj
Stefan Kothaj - avatar