diff --git a/lib/matplotlib/colors.py b/lib/matplotlib/colors.py index 1b159329deac..0313565a2583 100644 --- a/lib/matplotlib/colors.py +++ b/lib/matplotlib/colors.py @@ -1371,9 +1371,8 @@ def inverse(self, value): def autoscale(self, A): """Set *vmin*, *vmax* to min, max of *A*.""" - A = np.asanyarray(A) - self.vmin = A.min() - self.vmax = A.max() + self.vmin = self.vmax = None + self.autoscale_None(A) def autoscale_None(self, A): """If vmin or vmax are not set, use the min/max of *A* to set them.""" @@ -1715,14 +1714,8 @@ def inverse(self, value): .reshape(np.shape(value))) return value[0] if is_scalar else value - def autoscale(self, A): - # i.e. A[np.isfinite(...)], but also for non-array A's - in_trf_domain = np.extract(np.isfinite(self._trf.transform(A)), A) - if in_trf_domain.size == 0: - in_trf_domain = np.ma.masked - return super().autoscale(in_trf_domain) - def autoscale_None(self, A): + # i.e. A[np.isfinite(...)], but also for non-array A's in_trf_domain = np.extract(np.isfinite(self._trf.transform(A)), A) if in_trf_domain.size == 0: in_trf_domain = np.ma.masked 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