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

Skip to content

Commit b9262c9

Browse files
authored
Merge pull request #26708 from meeseeksmachine/auto-backport-of-pr-26601-on-v3.8.x
Backport PR #26601 on branch v3.8.x (Avoid checking limits when updating both min and max for contours)
2 parents 19b078c + 379c335 commit b9262c9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/matplotlib/contour.py

Lines 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)