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

Underscore character does not exist for cmr10 font #16995

Closed
@jrwrigh

Description

@jrwrigh

Bug report

The bundled fontcmr10 (and it's associated family) do not contain the underscore character. Instead, the unicode character for the underscore (according tothis website anyways) is actually mappted to the overdot.

Seethis StackOverflow for details, but I'll repeat here.

Code for reproduction

importmatplotlib.pyplotaspltplt.rcParams.update({'font.family':'serif','font.serif':'cmr10',})variable=range(5)plt.plot(variable,variable,label='test_underscore')plt.plot(variable,variable,label='escape\_underscore')plt.plot(variable,variable,label=r'rawtest_underscore')plt.plot(variable,variable,label=r'rawescape\_underscore')_=plt.legend()

Actual outcome

image

Expected outcome

image

Matplotlib version

  • Operating system: Manjaro 19.0.2
  • Matplotlib version: 3.1.3
  • Matplotlib backend (print(matplotlib.get_backend())): module://ipykernel.pylab.backend_inline
  • Python version: 3.7.6

Other
cmr10 loaded into FontForge shows that:
A) the underscore character doesn't exist
B) the normal underscore character (005f) is replaced by the overdot
image

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