matplotlib
always uses its own set of fonts, independently of other fonts installed on the system. On Ubuntu 12.04 LTS, these fonts are located in /usr/share/matplotlib/mpl-data/fonts/
.
When calling a font in your code which is not available in this directory, matplotlib
will first try to fall back to Bitstream Vera Sans. However, neither that font is available in .../mpl-data/fonts/
on Ubuntu 12.04 LTS installations. Finally, matplotlib
falls back to the cmb10.ttf
font, which is available.
Installing system font packages as suggested above will not remedy this warning.
One can, however, add rcParams['mathtext.fontset'] = 'cm'
to the code to avoid the multiple fallbacks and warnings.
Alternatively, specify a font which is present in /usr/share/matplotlib/mpl-data/fonts/
.