I've researched this a lot and can't get it to work.
How can I change the font for matplotlib?
I think my issue is the font cache, based on my research.
I have the ttf in the right folder.
people keep saying rm ~/.matplotlib/fontList.cache
is the command to use, but I can't find a .matplotlib folder or a fontlist.cache anywhere on my computer.
I'm using a Mac. Do I need to provide more information or does it seem like it might just be the cache? If it's the cache, how do I clear it?
It may be located under ~/. matplotlib/fontList. cache or ~/. cache/matplotlib/fontList.
Usually, double-click on the . ttf file and then click on the Install button in the window that pops up. Note that Matplotlib handles fonts in True Type Format (. ttf) , so make sure you install fonts ending in .
The default font has changed from "Bitstream Vera Sans" to "DejaVu Sans".
run the following code to get the font cache dir:
import matplotlib
matplotlib.get_cachedir()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With