Skip to content

Matplotlib produces blank eps images when text.usetex option is True in matplotlibrc #17373

Closed
@latrop

Description

@latrop

Bug report

When I try to save a plot as an EPS file with savefig() function, the result is just blank image. If I set text.usetex option to False, everything looks fine. The problem is only with EPS format. PDF or PNG files are produced correctly regardless of text.usetex option.

Code for reproduction

The code can be as simple as

from matplotlib import pyplot as plt                                                                                                   
                                                                                                                                       
plt.plot([1, 2], [1, 2])                                                                                                               
plt.savefig("test.eps") 

Actual outcome
Blank EPS file (but it's size is 182K).

Expected outcome
EPS file containing an actual plot.

Matplotlib version

  • Operating system: Arch linux, everything is up to date
  • Matplotlib version: 3.2.1, installed using Arch package manager
  • Matplotlib backend: Qt5Agg
  • Python version: 3.8.2

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