From 379c335fff00031b8148f9a0c2eb2ccc79c68f35 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 6 Sep 2023 15:44:22 -0400 Subject: [PATCH] Backport PR #26601: Avoid checking limits when updating both min and max for contours --- lib/matplotlib/contour.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/matplotlib/contour.py b/lib/matplotlib/contour.py index f148d35618dd..efea024dc102 100644 --- a/lib/matplotlib/contour.py +++ b/lib/matplotlib/contour.py @@ -887,10 +887,12 @@ def __init__(self, ax, *args, self.set_cmap(cmap) if norm is not None: self.set_norm(norm) - if vmin is not None: - self.norm.vmin = vmin - if vmax is not None: - self.norm.vmax = vmax + with self.norm.callbacks.blocked(signal="changed"): + if vmin is not None: + self.norm.vmin = vmin + if vmax is not None: + self.norm.vmax = vmax + self.norm._changed() self._process_colors() if self._paths is None: pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy