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 75ef6e2

Browse filesBrowse files
authored
Merge pull request #26601 from ksunden/contour_vlim
Avoid checking limits when updating both min and max for contours
2 parents 781c6a0 + e908ac1 commit 75ef6e2
Copy full SHA for 75ef6e2

File tree

1 file changed

+6
-4
lines changed
Filter options

1 file changed

+6
-4
lines changed

‎lib/matplotlib/contour.py

Copy file name to clipboardExpand all lines: lib/matplotlib/contour.py
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -887,10 +887,12 @@ def __init__(self, ax, *args,
887887
self.set_cmap(cmap)
888888
if norm is not None:
889889
self.set_norm(norm)
890-
if vmin is not None:
891-
self.norm.vmin = vmin
892-
if vmax is not None:
893-
self.norm.vmax = vmax
890+
with self.norm.callbacks.blocked(signal="changed"):
891+
if vmin is not None:
892+
self.norm.vmin = vmin
893+
if vmax is not None:
894+
self.norm.vmax = vmax
895+
self.norm._changed()
894896
self._process_colors()
895897

896898
if self._paths is None:

0 commit comments

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