Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bug in postscript backend in Python 3#1779

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mdboom merged 3 commits intomatplotlib:v1.2.xfrommdboom:ps/python3
Mar 1, 2013
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletionslib/matplotlib/backends/backend_ps.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -469,7 +469,7 @@ def draw_image(self, gc, x, y, im, dx=None, dy=None, transform=None):
im.flipud_out()

h, w, bits, imagecmd = self._get_image_h_w_bits_command(im)
hexlines = '\n'.join(self._hex_lines(bits))
hexlines =b'\n'.join(self._hex_lines(bits)).decode('ascii')

if dx is None:
xscale = w / self.image_magnification
Expand DownExpand Up@@ -1179,6 +1179,7 @@ def write(self, *kl, **kwargs):
print("end", file=fh)
print("showpage", file=fh)
if not isEPSF: print("%%EOF", file=fh)
fh.flush()

if rcParams['ps.usedistiller'] == 'ghostscript':
gs_distill(tmpfile, isEPSF, ptype=papertype, bbox=bbox)
Expand All@@ -1187,7 +1188,7 @@ def write(self, *kl, **kwargs):

if passed_in_file_object:
with open(tmpfile, 'rb') as fh:
print(fh.read(), file=outfile)
outfile.write(fh.read())
else:
with open(outfile, 'w') as fh:
pass
Expand DownExpand Up@@ -1293,6 +1294,7 @@ def write(self, *kl, **kwargs):
#print >>fh, "grestore"
print("end", file=fh)
print("showpage", file=fh)
fh.flush()

if isLandscape: # now we are ready to rotate
isLandscape = True
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp