SourceForge logo
SourceForge logo
Menu

SF.net SVN: matplotlib:[6052] trunk/matplotlib

From: <md...@us...> - 2008年08月28日 12:42:55
Revision: 6052
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6052&view=rev
Author: mdboom
Date: 2008年08月28日 12:42:52 +0000 (2008年8月28日)
Log Message:
-----------
Fix clip_on kwarg to work correctly.
Modified Paths:
--------------
 trunk/matplotlib/CHANGELOG
 trunk/matplotlib/lib/matplotlib/artist.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG	2008年08月26日 13:24:00 UTC (rev 6051)
+++ trunk/matplotlib/CHANGELOG	2008年08月28日 12:42:52 UTC (rev 6052)
@@ -1,3 +1,5 @@
+2008年08月28日 Fix clip_on kwarg so it actually works correctly - MGD
+
 2008年08月25日 Fix locale problems in SVG backend - MGD
 
 2008年08月22日 fix quiver so masked values are not plotted - JSW
Modified: trunk/matplotlib/lib/matplotlib/artist.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/artist.py	2008年08月26日 13:24:00 UTC (rev 6051)
+++ trunk/matplotlib/lib/matplotlib/artist.py	2008年08月28日 12:42:52 UTC (rev 6052)
@@ -39,7 +39,7 @@
 self._alpha = 1.0
 self.clipbox = None
 self._clippath = None
- self._clipon = False
+ self._clipon = True
 self._lod = False
 self._label = ''
 self._picker = None
@@ -292,7 +292,6 @@
 ACCEPTS: a :class:`matplotlib.transform.Bbox` instance
 """
 self.clipbox = clipbox
- self._clipon = clipbox is not None or self._clippath is not None
 self.pchanged()
 
 def set_clip_path(self, path, transform=None):
@@ -341,7 +340,6 @@
 print type(path), type(transform)
 raise TypeError("Invalid arguments to set_clip_path")
 
- self._clipon = self.clipbox is not None or self._clippath is not None
 self.pchanged()
 
 def get_alpha(self):
@@ -361,7 +359,7 @@
 
 def get_clip_on(self):
 'Return whether artist uses clipping'
- return self._clipon and (self.clipbox is not None or self._clippath is not None)
+ return self._clipon
 
 def get_clip_box(self):
 'Return artist clipbox'
@@ -388,16 +386,17 @@
 ACCEPTS: [True | False]
 """
 self._clipon = b
- if not b:
- self.clipbox = None
- self._clippath = None
 self.pchanged()
 
 def _set_gc_clip(self, gc):
 'set the clip properly for the gc'
- if self.clipbox is not None:
- gc.set_clip_rectangle(self.clipbox)
- gc.set_clip_path(self._clippath)
+ if self._clipon:
+ if self.clipbox is not None:
+ gc.set_clip_rectangle(self.clipbox)
+ gc.set_clip_path(self._clippath)
+ else:
+ gc.set_clip_rectangle(None)
+ gc.set_clip_path(None)
 
 def draw(self, renderer, *args, **kwargs):
 'Derived classes drawing method'
@@ -511,7 +510,7 @@
 def findobj(self, match=None):
 """
 pyplot signature:
- findobj(o=gcf(), match=None) 
+ findobj(o=gcf(), match=None)
 
 recursively find all :class:matplotlib.artist.Artist instances
 contained in self
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /