Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
latrop opened this issue May 9, 2020 · 3 comments

Comments

@latrop
Copy link

latrop commented May 9, 2020

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
@anntzer
Copy link
Contributor

anntzer commented May 9, 2020

I cannot repro with the Arch package.

@cnvega
Copy link

cnvega commented May 25, 2020

I'm having exactly the same issue since a couple of weeks (Arch Linux as well). When the text.usetex option is set to True, the eps figures result in blank files. I tried the agg and ps backends. My packages are:
python 3.8.2-2
python-matplotlib 3.2.1-1

@anntzer
Copy link
Contributor

anntzer commented May 26, 2020

Ah yes, sorry I missed it. This is however fixed as of master by #17255, AFAICT, which is already backported to the (not yet released) 3.2.2.

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

No branches or pull requests

3 participants