FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[Bug]: Rendering issues when saving as pdf · Issue #32029 · matplotlib/matplotlib · GitHub

Repository navigation

[Bug]: Rendering issues when saving as pdf #32029

Closed as duplicate
Closed as duplicate

Description

Bug summary

Hi, I am experiencing issues when saving figures as pdf. In particular, some text ingredients are missing. For example, the left parenthesis is missing on the first line, the minus sign as well as the Greek letter Gamma are missing on the second line. Please see the attached pdf below.

test.pdf

Code for reproduction

import matplotlib
matplotlib.use('Agg')
matplotlib.rcParams['text.latex.preamble'] = r'\usepackage{amsmath, gensymb}'
matplotlib.rc('text', usetex = True)
import matplotlib.pyplot as py

py.figure(figsize=(4,4))

text = r'\boldmath{$\mathrm{Sivers} \left(  f_{1T}^{\bot} \right)$}'
py.text(1.0, 1.0, text, fontsize = 20)
text = r'\boldmath{$1 - 2 \Gamma$}'
py.text(1.0, 0.6, text, fontsize = 20)

py.axis('off')
py.tight_layout()
py.savefig('./test.png', dpi = 500)

Actual outcome

As I have described before, some text ingredients are missing. For example, the left parenthesis is missing on the first line, the minus sign as well as the Greek letter Gamma are missing on the second line...

Expected outcome

If I instead use py.savefig('./test.png', dpi = 500), the outcome is good! Please see the attached figure below.

Additional information

I have also tried on Linux 3.10.0-1160.el7.x86_64, the same issue persists.

Operating system

macOS

Matplotlib Version

3.11.0

Matplotlib Backend

Agg

Python version

3.12.12

Jupyter version

No response

Installation

pip

Activity

  1. QuLogic commented on Jul 10, 2026

    Member

    This is a dupe of #31925 and will be fixed in 3.11.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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


      Back | FazBrowse Home | New Git URL