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

Skip to content

Commit 89c03d2

Browse files
committed
conditionally set default clippath
svn path=/branches/v0_98_5_maint/; revision=6856
1 parent 703b0e3 commit 89c03d2

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

lib/matplotlib/axes.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,9 @@ def add_collection(self, collection, autolim=True):
13061306
collection.set_label('collection%d'%len(self.collections))
13071307
self.collections.append(collection)
13081308
self._set_artist_props(collection)
1309-
collection.set_clip_path(self.patch)
1309+
1310+
if collection.get_clip_path() is None:
1311+
collection.set_clip_path(self.patch)
13101312
if autolim:
13111313
if collection._paths and len(collection._paths):
13121314
self.update_datalim(collection.get_datalim(self.transData))
@@ -1319,7 +1321,8 @@ def add_line(self, line):
13191321
lines
13201322
'''
13211323
self._set_artist_props(line)
1322-
line.set_clip_path(self.patch)
1324+
if line.get_clip_path() is None:
1325+
line.set_clip_path(self.patch)
13231326

13241327
self._update_line_limits(line)
13251328
if not line.get_label():
@@ -1344,7 +1347,8 @@ def add_patch(self, p):
13441347
"""
13451348

13461349
self._set_artist_props(p)
1347-
p.set_clip_path(self.patch)
1350+
if p.get_clip_path() is None:
1351+
p.set_clip_path(self.patch)
13481352
self._update_patch_limits(p)
13491353
self.patches.append(p)
13501354
p._remove_method = lambda h: self.patches.remove(h)

0 commit comments

Comments
 (0)