Skip to content

EPS + usetex is broken #17253

Closed
Closed

Description

@QuLogic

Bug report

Bug summary

I was testing #131, and it produces an empty plot now. Removing the usetex rc change produces a working plot.

Code for reproduction

import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib import rc

rc('text', usetex=True)

g1, = plt.plot([1,2,3,4],[500,600,700,800])
g2, = plt.plot([1,2,3,4],[700,300,700,200])
g3, = plt.plot([1,2,3,4],[800,600,900,800])

plt.figlegend([g1,g2,g3],['test1','test2','test3'],'upper left')

plt.savefig('image.png')
plt.savefig('image.eps')

plt.show()

Bisect says that it broke at 200094d and #14833. cc @anntzer

And a diff shows that the media box is completely wrong:

-  <</Type/Page/MediaBox [0 0 460.8 345.6]                                  
+  <</Type/Page/MediaBox [0 0 5184 5184]                                   

Activity

  1. added this to the v3.2.2 milestone on Apr 28, 2020
  2. QuLogic commented on Apr 28, 2020

    @QuLogic
    MemberAuthor

    If I'm not mistaken, #14833 lost font_preamble and custom_preamble, but I'm not sure if that's what broke it.

  3. tacaswell commented on Apr 28, 2020

    @tacaswell
    Member

    Going to re-open this until we get the fix backported.

  4. QuLogic commented on Apr 28, 2020

    @QuLogic
    MemberAuthor

    Backport is merged.

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions