1

I am trying to change the font size of my x axis that happens to be strings and not numbers. I have changed other charts that have integers by using :

plt.xticks(size=10)

However, this dose not work for some of my graphs that have months in the place of integers. Keep in mind i am not using subplots.

spacedinosaur10
  • 695
  • 3
  • 10
  • 24

1 Answers1

1

Try setting the fontsize either by using the the fontsize keyword argument or if you want to globally change it to every plot in your script by updating the rcParams as

import matplotlib 
matplotlib.rc('xtick', labelsize=20)

Also look at this answer: How to change the font size on a matplotlib plot

Or here: How can I change the font size of ticks of axes object in matplotlib

Community
  • 1
  • 1
pathoren
  • 1,634
  • 2
  • 14
  • 22