Open KatiRG opened 3 years ago
Very strange.
Plot font family and fonts can be defined using mpl.rcParams
, see here.
e.g.
mpl.rcParams['font.family'] = 'sans-serif'
But, it seems that the above line needs to be run twice to actually work.....
So for now, this line is inside the function, but then before calling the function, I copy this line above the function call so that it runs again.
STRANGE!
About system fonts, you can find which fonts are already installed in your system in this file:
~/.cache/matplotlib/fontlist-v300.json
To install a new font:
Ask an admin to follow this tutorial.
IMPORTANT: Each user needs to remove their font cache (rm -r ~/.cache/matplotlib
in the shell) and/or rebuild it with:
import matplotlib.font_manager as font_managerfont_manager._rebuild()
Using
results in error:
findfont: Font family ['Libre Franklin'] not found. Falling back to DejaVu Sans.