Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2c59935

Browse filesBrowse files
committed
FIX: short-circuit the contour changed call when uninitialized
The Quadcontourset.changed() method assumes some attributes to be there. If we called changed from a parent class, the object may not have been initialized with those attributes yet, so skip that portion of the update.
1 parent 8eaff42 commit 2c59935
Copy full SHA for 2c59935

File tree

Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed

‎lib/matplotlib/contour.py

Copy file name to clipboardExpand all lines: lib/matplotlib/contour.py
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,10 @@ def _make_paths(self, segs, kinds):
10271027
return [mpath.Path(seg) for seg in segs]
10281028

10291029
def changed(self):
1030+
if not hasattr(self, "cvalues"):
1031+
# Just return after calling the super() changed function
1032+
cm.ScalarMappable.changed(self)
1033+
return
10301034
# Force an autoscale immediately because self.to_rgba() calls
10311035
# autoscale_None() internally with the data passed to it,
10321036
# so if vmin/vmax are not set yet, this would override them with

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.