Revision: 5133
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5133&view=rev
Author: efiring
Date: 2008-05-09 00:45:29 -0700 (Fri, 09 May 2008)
Log Message:
-----------
Fix bugs I introduced in last work on backend_ps.py.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/backend_bases.py
trunk/matplotlib/lib/matplotlib/backends/backend_ps.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-05-08 17:24:15 UTC (rev
5132)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-05-09 07:45:29 UTC (rev
5133)
@@ -4552,7 +4552,7 @@
d2 = (x-ix2-0.5)**2 + 3.0 * (y-iy2-0.5)**2
bdist = (d1<d2)
- for i in xrange(len(x)):
+ for i in range(len(x)):
if bdist[i]:
lattice1[ix1[i], iy1[i]]+=1
else:
Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-05-08 17:24:15 UTC
(rev 5132)
+++ trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-05-09 07:45:29 UTC
(rev 5133)
@@ -123,9 +123,10 @@
if showedges:
edgecolors = np.array([[0.0, 0.0, 0.0, 1.0]], np.float_)
+ linewidths = np.array([1.0], np.float_)
else:
edgecolors = facecolors
- linewidths = np.array([1.0], np.float_)
+ linewidths = np.array([0.0], np.float_)
return self.draw_path_collection(
master_transform, cliprect, clippath, clippath_trans,
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_ps.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_ps.py 2008-05-08
17:24:15 UTC (rev 5132)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_ps.py 2008-05-09
07:45:29 UTC (rev 5133)
@@ -744,68 +744,6 @@
""" % locals()
self._pswriter.write(ps)
- def _draw_ps_oldstyle(self, ps, gc, rgbFace, fill=True, stroke=True,
command=None):
- """
- Emit the PostScript sniplet 'ps' with all the attributes from 'gc'
- applied. 'ps' must consist of PostScript commands to construct a path.
-
- This is the JDH-modified version of the original. It is kept
- here now to facilitate checking the version below until we converge.
-
- """
- # local variable eliminates all repeated attribute lookups
- write = self._pswriter.write
- if debugPS and command:
- write("% "+command+"\n")
-
- stroke = (stroke and gc.get_linewidth() > 0.0 and
- (len(gc.get_rgb()) <= 3 or gc.get_rgb()[3] != 0.0))
- fill = (fill and rgbFace is not None and
- (len(rgbFace) <= 3 or rgbFace[3] != 0.0))
-
- if stroke or gc.get_linewidth() > 0.0:
- self.set_linewidth(gc.get_linewidth())
- jint = gc.get_joinstyle()
- self.set_linejoin(jint)
- cint = gc.get_capstyle()
- self.set_linecap(cint)
- self.set_linedash(*gc.get_dashes())
- self.set_color(*gc.get_rgb()[:3])
-
- cliprect = gc.get_clip_rectangle()
- if cliprect:
- x,y,w,h=cliprect.bounds
- write('gsave\n%1.4g %1.4g %1.4g %1.4g clipbox\n' % (w,h,x,y))
- clippath, clippath_trans = gc.get_clip_path()
- if clippath:
- id = self._get_clip_path(clippath, clippath_trans)
- write('gsave\n%s\n' % id)
-
- # Jochen, is the strip necessary? - this could be a honking big string
- write(ps.strip())
- write("\n")
-
- hatch = gc.get_hatch()
- if hatch:
- self.set_hatch(hatch)
-
- if fill:
- #print 'rgbface', rgbFace
- write("gsave\n")
- self.set_color(store=0, *rgbFace[:3])
- write("fill\ngrestore\n")
-
- if stroke or gc.get_linewidth() > 0.0:
- write("stroke\n")
- else:
- write("newpath\n")
-
- if clippath:
- write("grestore\n")
- if cliprect:
- write("grestore\n")
-
-
def _draw_ps(self, ps, gc, rgbFace, fill=True, stroke=True, command=None):
"""
Emit the PostScript sniplet 'ps' with all the attributes from 'gc'
@@ -820,13 +758,13 @@
write = self._pswriter.write
if debugPS and command:
write("% "+command+"\n")
- write('gsave\n')
- stroke = (stroke and gc.get_linewidth() > 0.0 and
+ mightstroke = (gc.get_linewidth() > 0.0 and
(len(gc.get_rgb()) <= 3 or gc.get_rgb()[3] != 0.0))
+ stroke = stroke and mightstroke
fill = (fill and rgbFace is not None and
(len(rgbFace) <= 3 or rgbFace[3] != 0.0))
- if stroke:
+ if mightstroke:
self.set_linewidth(gc.get_linewidth())
jint = gc.get_joinstyle()
self.set_linejoin(jint)
@@ -834,6 +772,7 @@
self.set_linecap(cint)
self.set_linedash(*gc.get_dashes())
self.set_color(*gc.get_rgb()[:3])
+ write('gsave\n')
cliprect = gc.get_clip_rectangle()
if cliprect:
@@ -852,7 +791,6 @@
if hatch:
self.set_hatch(hatch)
-
if fill:
if stroke:
write("gsave\n")
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins