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

Skip to content

Commit 32f64b0

Browse files
committed
Merged revisions 8902,8906,8908 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v1_0_maint ........ r8902 | mdehoon | 2011-01-07 21:09:23 -1000 (Fri, 07 Jan 2011) | 2 lines Fixing a bug. Due to a race condition, the view of a closing window could get one release too many. ........ r8906 | efiring | 2011-01-11 21:53:37 -1000 (Tue, 11 Jan 2011) | 2 lines Fix eps distillation bbox bug; closes 3032385 ........ r8908 | efiring | 2011-01-11 22:14:53 -1000 (Tue, 11 Jan 2011) | 2 lines Add missing show() to example; patch by C. Gohlke; closes 3151545 ........ svn path=/trunk/matplotlib/; revision=8910
1 parent 42779f1 commit 32f64b0

File tree

3 files changed

+5
-20
lines changed

3 files changed

+5
-20
lines changed

examples/api/quad_bezier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
ax.plot([0.75], [0.25], "ro")
1717
ax.set_title('The red point should be on the path')
1818

19-
plt.draw()
19+
plt.show()
2020

lib/matplotlib/backends/backend_ps.py

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,8 @@ def gs_distill(tmpfile, eps=False, ptype='letter', bbox=None, rotated=False):
13631363
operators. The output is low-level, converting text to outlines.
13641364
"""
13651365

1366-
paper_option = "-sPAPERSIZE=%s" % ptype
1366+
if eps: paper_option = "-dEPSCrop"
1367+
else: paper_option = "-sPAPERSIZE=%s" % ptype
13671368

13681369
psfile = tmpfile + '.ps'
13691370
outfile = tmpfile + '.output'
@@ -1385,14 +1386,6 @@ def gs_distill(tmpfile, eps=False, ptype='letter', bbox=None, rotated=False):
13851386
shutil.move(psfile, tmpfile)
13861387

13871388

1388-
# While it is best if above steps preserve the original bounding
1389-
# box, it does not seems to be the case. pstoeps not only convert
1390-
# the input to eps format, but also restores the original bbox.
1391-
1392-
if eps:
1393-
pstoeps(tmpfile, bbox, rotated=rotated)
1394-
1395-
13961389
def xpdf_distill(tmpfile, eps=False, ptype='letter', bbox=None, rotated=False):
13971390
"""
13981391
Use ghostscript's ps2pdf and xpdf's/poppler's pdftops to distill a file.
@@ -1432,17 +1425,9 @@ def xpdf_distill(tmpfile, eps=False, ptype='letter', bbox=None, rotated=False):
14321425
os.remove(tmpfile)
14331426
shutil.move(psfile, tmpfile)
14341427

1435-
1436-
# Similar to the gs_distillier case, ps2pdf does not seem to
1437-
# preserve the bbox of the original file (at least w/ gs
1438-
# 8.61). Thus, the original bbox need to be resotred.
1439-
1440-
if eps:
1441-
pass
14421428
for fname in glob.glob(tmpfile+'.*'):
14431429
os.remove(fname)
14441430

1445-
14461431
def get_bbox_header(lbrt, rotated=False):
14471432
"""
14481433
return a postscript header stringfor the given bbox lbrt=(l, b, r, t).

src/_macosx.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1904,7 +1904,7 @@ static int _find_minimum(CGFloat values[3])
19041904
i = 2;
19051905
return i;
19061906
}
1907-
1907+
19081908
static int _find_maximum(CGFloat values[3])
19091909
{
19101910
int i = 0;
@@ -1918,7 +1918,7 @@ static int _find_maximum(CGFloat values[3])
19181918
i = 2;
19191919
return i;
19201920
}
1921-
1921+
19221922
static void
19231923
_rgba_color_evaluator(void* info, const CGFloat input[], CGFloat outputs[])
19241924
{

0 commit comments

Comments
 (0)