Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[MNT]: pyplot.xkcd() leads to findfont errors under Windows #27350

Open
@bkasel

Description

@bkasel

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'],...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp