Reputation: 2504
I want the ticks in matplotlib to be typeset using Computer Modern sans-serif. How do I do this?
I would have expected this would do the trick, but it doesn't:
mpl.rcParams['font.family'] = 'computer modern sans serif'
Upvotes: 0
Views: 165
Reputation: 169314
Try this:
mpl.rcParams['font.family'] = 'sans-serif'
mpl.rcParams['font.sans-serif'] = ['computer modern']
The font.family property has five values:
After setting the font family you provide a list of fonts for matplotlib to try to find in order.
Upvotes: 2