Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a3c02a3

Browse files
leejjoonmdboom
authored andcommitted
fix pstoeps function in backend_ps.py
1 parent f9c7b67 commit a3c02a3

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/matplotlib/backends/backend_ps.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,15 +1684,12 @@ def pstoeps(tmpfile, bbox=None, rotated=False):
16841684
# eps file is not modified.
16851685
line = tmph.readline()
16861686
while line:
1687-
if line.startswith(b'%%Trailer'):
1688-
write(b'%%Trailer\n')
1687+
if line.startswith(b'%%EOF'):
16891688
write(b'cleartomark\n')
16901689
write(b'countdictstack\n')
16911690
write(b'exch sub { end } repeat\n')
16921691
write(b'restore\n')
1693-
if rcParams['ps.usedistiller'] == 'xpdf':
1694-
# remove extraneous "end" operator:
1695-
line = tmph.readline()
1692+
write(b'%%EOF\n')
16961693
elif line.startswith(b'%%PageBoundingBox'):
16971694
pass
16981695
else:

0 commit comments

Comments
 (0)