8000 Computer Modern Roman should be the default serif when using TeX backend · Issue #5860 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Computer Modern Roman should be the default serif when using TeX backend #5860
Closed
@srvanrell

Description

@srvanrell

I come from this question http://stackoverflow.com/questions/16287921/python-matplotlib-change-axis-labels-legend-from-bold-to-regular-weight

There, Alexander Vogt explains that the default serif font is not Computer Modern Roman (as it is in any LaTeX document). Instead, the default is New Century School Book, and Alexander claims that it is set by texmanager.py (https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/texmanager.py). I think that maybe it wasn't the original intention when texmanager.py was written, because of the line:

serif = ('cmr', '')

and what is said in the old issue: #882

Don't you agree with Computer Modern Roman as the default serif font?.
Meanwhile, the following trick is a workaround:

font = {'family':'serif', 'serif': ['computer modern roman']}
plt.rc('font',**font)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0