Skip to content

Matplotlib warning about no LaTeX-compatible font. #30

@arnauqb

Description

@arnauqb

Hi,

Whenever I use this package setting

plt.style.use(["science"])
plt.style.reload_library()

I get the following warning sign multiple times when I plot anything:

matplotlib.texmanager - INFO - No LaTeX-compatible font found for the serif font family in rcParams. Using default.

Now, I have investigated a little, this warning is issued here:

https://github.com/matplotlib/matplotlib/blob/02af61b3000b93efad98f415b4a7eb330c9e46c1/lib/matplotlib/texmanager.py#L124

so it looks like it cannot found the specified font in the attribute TexManager.font_info. I have printed the font that is trying to look at, and it is "Times New Roman", as you would expect, but indeed that font is not found in the font_info dictionary:

https://github.com/matplotlib/matplotlib/blob/02af61b3000b93efad98f415b4a7eb330c9e46c1/lib/matplotlib/texmanager.py#L62

What am I missing here? I am using:

SciencePlots: latest commite release
Matplotlib: 3.3.0
OS: Manjaro 20.2
Tex: Texlive installation with these packages:

texlive-bibtexextra
texlive-core
texlive-fontsextra
texlive-formatsextra
texlive-games
texlive-humanities
texlive-latexextra
texlive-music
texlive-pictures
texlive-pstricks
texlive-publishers
texlive-science

Thank you very much for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions