From 4e3774846e0f16223106c34660e326e8e438fcd0 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Tue, 14 Jun 2022 11:19:58 +0200 Subject: [PATCH] Remove dead code --- lib/matplotlib/colorbar.py | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/lib/matplotlib/colorbar.py b/lib/matplotlib/colorbar.py index 4c7fea2e1fdb..bd6b5d967ae4 100644 --- a/lib/matplotlib/colorbar.py +++ b/lib/matplotlib/colorbar.py @@ -454,7 +454,7 @@ def __init__(self, ax, mappable=None, *, cmap=None, if np.iterable(ticks): self._locator = ticker.FixedLocator(ticks, nbins=len(ticks)) else: - self._locator = ticks # Handle default in _ticker() + self._locator = ticks if isinstance(format, str): # Check format between FormatStrFormatter and StrMethodFormatter @@ -1095,32 +1095,6 @@ def remove(self): # use_gridspec was True ax.set_subplotspec(subplotspec) - def _ticker(self, locator, formatter): - """ - Return the sequence of ticks (colorbar data locations), - ticklabels (strings), and the corresponding offset string. - """ - if isinstance(self.norm, colors.NoNorm) and self.boundaries is None: - intv = self._values[0], self._values[-1] - else: - intv = self.vmin, self.vmax - locator.create_dummy_axis(minpos=intv[0]) - locator.axis.set_view_interval(*intv) - locator.axis.set_data_interval(*intv) - formatter.set_axis(locator.axis) - - b = np.array(locator()) - if isinstance(locator, ticker.LogLocator): - eps = 1e-10 - b = b[(b <= intv[1] * (1 + eps)) & (b >= intv[0] * (1 - eps))] - else: - eps = (intv[1] - intv[0]) * 1e-10 - b = b[(b <= intv[1] + eps) & (b >= intv[0] - eps)] - ticks = self._locate(b) - ticklabels = formatter.format_ticks(b) - offset_string = formatter.get_offset() - return ticks, ticklabels, offset_string - def _process_values(self): """ Set `_boundaries` and `_values` based on the self.boundaries and 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