8000 Fix exception when a particular contour doesn't exist. · adrn/matplotlib@79be499 · GitHub
[go: up one dir, main page]

Skip to content

Commit 79be499

Browse files
committed
Fix exception when a particular contour doesn't exist.
svn path=/branches/transforms/; revision=4569
1 parent f91469a commit 79be499

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/axes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,8 @@ def add_collection(self, collection, autolim=True):
11371137
self._set_artist_props(collection)
11381138
collection.set_clip_path(self.axesPatch)
11391139
if autolim:
1140-
self.update_datalim(collection.get_datalim(self.transData))
1140+
if len(collection._paths):
1141+
self.update_datalim(collection.get_datalim(self.transData))
11411142
collection._remove_method = lambda h: self.collections.remove(h)
11421143

11431144
def add_line(self, line):

0 commit comments

Comments
 (0)
0