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

Two different fonts in the axes in pgf images #14637

Closed as not planned
Closed as not planned
Labels
status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: confirmed bugstatus: inactiveMarked by the “Stale” Github Action
@jakobjakobson13

Description

@jakobjakobson13

Bug report

Bug summary

A pgf image exported by matplotlib leads to two different fonts in the x- and y-axis in alatex document

Code for reproduction
First you have to create the figure with the following code or a similar one.

importmatplotlibasmplmpl.rcParams["axes.formatter.use_mathtext"]=Falseimportmatplotlib.pyplotaspltplt.close()plt.semilogy(3.5,3.5e3,"o")plt.savefig("test.pdf")plt.savefig("test.pgf")

Then you put thepgf figure into a latex document:

\documentclass{scrartcl}\usepackage{pgf}\begin{document}\input{test.pgf}\end{document}

Actual outcome

Latex produces a pdf document with the y-axis in roman font (computer modern roman) and the x-axis in a sans-serif font (computer modern sans). I had expected both axes to have the same font.
Thepdf produced by matplotlib in contrast has the sans-serif font for both axes.

Expected outcome

I would expected both axes to have a sans-serif font like in the pdf produced by matplotlib itself. However, I'm not sure if this is more latex related.
I also found a similar question onstackoverflow.

Matplotlib version

  • Operating system: Ubuntu 18.04.2
  • Matplotlib version: 3.1.0
  • Matplotlib backend: TkAgg
  • Python version: 3.6.8
  • Jupyter version (if applicable): not important
  • Other libraries: pdfTex 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian)

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: confirmed bugstatus: inactiveMarked by the “Stale” Github Action

    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