Skip to content

Computer Modern Glyph Error #17007

@roussel-ryan

Description

@roussel-ryan

Bug report

Trying to use computer modern roman (cmr10) font in plot. Getting an error which prevents minus sign rendering in plot.

import matplotlib as mpl
import matplotlib.pyplot as plt

mpl.rc('font',family = 'serif', serif = 'cmr10')
fig, ax = plt.subplots()

ax.set_title('This is a special font:')
ax.set_xlabel(r'This is the default font $\alpha\beta\gamma$')
ax.set_yticks([-1,0,1])
plt.show()

Figure_1

Output:

C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py:214: RuntimeWarning: Glyph 8722 missing from current font.
  font.set_text(s, 0.0, flags=flags)
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py:183: RuntimeWarning: Glyph 8722 missing from current font.
  font.set_text(s, 0, flags=flags)

Expected outcome
Correct rendering of symbols

Matplotlib version

  • Operating system: Cygwin / Windows10 Enterprise 64 Bit
  • Matplotlib version: 3.2.1
  • Matplotlib backend (print(matplotlib.get_backend())):
  • Python version: 3.7.7
  • Jupyter version (if applicable): N/A
  • Other libraries:

Installed matplotlib via anaconda on default channel

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy