Revision: 4187
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4187&view=rev
Author:   jdh2358
Date:     2007-11-09 08:42:55 -0800 (Fri, 09 Nov 2007)

Log Message:
-----------
added face and edge color = 'None' support to patches

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/backend_bases.py
    trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py
    trunk/matplotlib/lib/matplotlib/patches.py

Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backend_bases.py    2007-11-09 16:40:25 UTC 
(rev 4186)
+++ trunk/matplotlib/lib/matplotlib/backend_bases.py    2007-11-09 16:42:55 UTC 
(rev 4187)
@@ -1199,6 +1199,7 @@
             self.figure.set_facecolor(origfacecolor)
             self.figure.set_edgecolor(origedgecolor)
             self.figure.set_canvas(self)
+            self.figure.canvas.draw()
             
         return result
 

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py   2007-11-09 
16:40:25 UTC (rev 4186)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py   2007-11-09 
16:42:55 UTC (rev 4187)
@@ -549,6 +549,9 @@
                 fname, err)
             error_msg_tkpaint(msg)
 
+        #the enlarged figure prints to the canvas and freezes unless a redraw 
is forced
+        self.canvas.draw()  
+
     def update(self):
         _focus = windowing.FocusManager()
         self._axes = self.canvas.figure.axes

Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py  2007-11-09 16:40:25 UTC (rev 
4186)
+++ trunk/matplotlib/lib/matplotlib/patches.py  2007-11-09 16:42:55 UTC (rev 
4187)
@@ -198,15 +198,23 @@
         if not self.get_visible(): return
         #renderer.open_group('patch')
         gc = renderer.new_gc()
-        gc.set_foreground(self._edgecolor)
-        gc.set_linewidth(self._linewidth)
+
+        if cbook.is_string_like(self._edgecolor) and 
self._edgecolor.lower()=='none':
+            gc.set_linewidth(0)
+        else:        
+            gc.set_foreground(self._edgecolor)
+            gc.set_linewidth(self._linewidth)
+
         gc.set_alpha(self._alpha)
         gc.set_antialiased(self._antialiased)
         self._set_gc_clip(gc)
         gc.set_capstyle('projecting')
 
-        if not self.fill or self._facecolor is None: rgbFace = None
-        else: rgbFace = colors.colorConverter.to_rgb(self._facecolor)
+        if (not self.fill or self._facecolor is None or
+            (cbook.is_string_like(self._facecolor) and 
self._facecolor.lower()=='none')):
+            rgbFace = None
+        else:
+            rgbFace = colors.colorConverter.to_rgb(self._facecolor)
 
         if self._hatch:
             gc.set_hatch(self._hatch )


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to