With the following imports:
import matplotlib as mpl
from scipy.cluster.hierarchy import dendrogram
I set the font size globally thus (based on this other Stack Overflow answer):
mpl.rcParams.update({'font.size': 20})
Then I create the dendrogram with the following (where m
is a matrix created elsewhere):
dendrogram(m)
Then finally I show the plot with:
mpl.pyplot.show()
The y-axis tick labels are 20 points as expected. However, the x-axis tick labels are tiny, much smaller than 20 points. It seems like matplotlib is automatically scaling down the font size to fit the density of the data despite the font size settings above. This is the case even when I zoom in and there is plenty of room to show the larger font.
How can I make the x-axis ticks use the larger font size?