-1

I have strings as my x-axis labels and I need to rotate them to be veritcal so that they fit on the actual axis. I can't find any answers that seem to be for my version of python, when I try things it doesn't recognise keywords and/or parameters.

My lables are 4-bit binary strings .e.g. '0000','0001','0010'........

Can anyone help me please??

1 Answers1

0

Is this what you are looking for?

plt.xticks(rotation=90)
plt.xticks(x, labels, rotation='vertical')

More from similar posting here: Rotate axis text in python matplotlib

And from matplotlib here: https://matplotlib.org/gallery/ticks_and_spines/ticklabels_rotation.html

ringoshin
  • 3
  • 1
  • 3