After multiple problems trying to run stanford.edu/~mwaskom/software/seaborn/ in Anaconda and Enthought for Mac (many problems with dependencies and versions), I was able to run
Well, if you want to use Arial, you'll need to install the Microsoft core fonts. If I recall correctly, Arial can't be freely redistributed under the same terms as most OSS, so you'll need to agree to the license agreement and install it yourself.
However, in more general terms, you just want to tweak the rc parameters. (Which can be done either at runtime through matplotlib.rc
/matplotlib.rcParams
or through a .matplotlibrc
file.)
For example, seaborn is basically doing this (among other things):
import matplotlib as mpl
mpl.rcParams['font.family'] = 'Arial'
The error is because you don't have the Arial font installed anywhere on your system.
You usually don't want to touch the font manager directly. There are plenty of exceptions, (e.g. using a specific .ttf file) but generally speaking, you'll want to stick to using the fonts installed on your system. You may want to specify a FontProperties
instance, but even for that, it's usually easier to specify things through other keyword arguments.