Back
In a matplotlib figure, how can I make the font size for the tick labels using ax1.set_xticklabels() smaller?
Further, how can one rotate it from horizontal to vertical?
You can use the below-mentioned code to make tick labels font size smaller in Matplotlib:
import matplotlib.pyplot as plt ax = plt.subplots() ax.tick_params(axis='both', which='major', labelsize=10) ax.tick_params(axis='both', which='minor', labelsize=8)
import matplotlib.pyplot as plt
ax = plt.subplots()
ax.tick_params(axis='both', which='major', labelsize=10)
ax.tick_params(axis='both', which='minor', labelsize=8)
This only answers to the size of label part of your question though.
31k questions
32.8k answers
501 comments
693 users