Revision: 6052
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6052&view=rev
Author: mdboom
Date: 2008-08-28 12:42:52 +0000 (Thu, 28 Aug 2008)
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.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins