Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Labels
Description
Summary
any plot with the xkcd stylepyplot.xkcd()
generates a bunch of errors from the findfont function under Windows even when fonts like "Comic Neue" are installed. I also regenerated the font cache and copied the font files into the matplotlib site-packages font folder, but this did not help. (I am using mpl 3.8.2 on python 3.11)
I am unsure if this is an issue under other OSs but I have the same issue under Win10 and Win11
Proposed fix
In the end I modified thepyplot.py
file in thexkcd
function, to get rid of the errors
rcParams.update({ 'font.font-family': ['xkcd', 'xkcd Script', 'Comic Neue', 'Comic Sans MS'],...
to
rcParams.update({ 'font.sans-serif': ['xkcd', 'xkcd Script', 'Comic Neue', 'Comic Sans MS'],...