Skip to content

Commit 1ea3239

Browse files
author
Clement Gilli
committed
solve issue #28105
1 parent acfef85 commit 1ea3239

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5228,11 +5228,6 @@ def reduce_C_function(C: array) -> float
52285228
vmin = vmax = None
52295229
bins = None
52305230

5231-
# autoscale the norm with current accum values if it hasn't been set
5232-
if norm is not None:
5233-
if norm.vmin is None and norm.vmax is None:
5234-
norm.autoscale(accum)
5235-
52365231
if bins is not None:
52375232
if not np.iterable(bins):
52385233
minimum, maximum = min(accum), max(accum)
@@ -5248,6 +5243,11 @@ def reduce_C_function(C: array) -> float
52485243
collection._internal_update(kwargs)
52495244
collection._scale_norm(norm, vmin, vmax)
52505245

5246+
# autoscale the norm with current accum values if it hasn't been set
5247+
if norm is not None:
5248+
if collection.norm.vmin is None and collection.norm.vmax is None:
5249+
collection.norm.autoscale()
5250+
52515251
corners = ((xmin, ymin), (xmax, ymax))
52525252
self.update_datalim(corners)
52535253
self._request_autoscale_view(tight=True)

0 commit comments

Comments
 (0)