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

fontset frommathtext throwing error after setting Textfont= #20099

Closed
Milestone
@diegopetrola

Description

@diegopetrola

Bug report

This issue was initially reported by the user@ain-soph at the PR#18145. I was able to reproduce the error with the provided code and decided to formalize the issue here while I work on it.

Code for reproduction:

importmatplotlib.pyplotaspltimportmatplotlibplt.figure(figsize=(6,5))plt.plot(range(11),color="0.9")msg= (r"Normal Text. $Text\ in\ math\ mode:\ "r"\int_{0}^{\infty } x^2 dx$")plt.text(1,7,msg,size=12,font='Arial')# math_fontfamily='cm'plt.show()

And the outcome is:

.... File "c:\repos\matplotlib\matplotlib\lib\matplotlib\mathtext.py", line 431, in _parse_cached    else _api.check_getitem(  File "c:\repos\matplotlib\matplotlib\lib\matplotlib\_api\__init__.py", line 187, in check_getitem    raise ValueError(ValueError: None is not a valid value for fontset; supported values are 'cm', 'dejavuserif', 'dejavusans', 'stix', 'stixsans', 'custom'

Matplotlib version: 3.4.1.post563+g679ca172e.d20210428

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp