diff --git a/lib/matplotlib/colorbar.py b/lib/matplotlib/colorbar.py index 0a9304b4979e..09d5aab96b52 100644 --- a/lib/matplotlib/colorbar.py +++ b/lib/matplotlib/colorbar.py @@ -1007,18 +1007,6 @@ def _central_N(self): nb -= 1 return nb - def _extended_N(self): - """ - Based on the colormap and extend variable, return the - number of boundaries. - """ - N = self.cmap.N + 1 - if self.extend == 'both': - N += 2 - elif self.extend in ('min', 'max'): - N += 1 - return N - def _get_extension_lengths(self, frac, automin, automax, default=0.05): """ Return the lengths of colorbar extensions. @@ -1267,13 +1255,7 @@ def add_lines(self, CS, erase=True): raise ValueError('add_lines is only for a ContourSet of lines') tcolors = [c[0] for c in CS.tcolors] tlinewidths = [t[0] for t in CS.tlinewidths] - # The following was an attempt to get the colorbar lines - # to follow subsequent changes in the contour lines, - # but more work is needed: specifically, a careful - # look at event sequences, and at how - # to make one object track another automatically. - #tcolors = [col.get_colors()[0] for col in CS.collections] - #tlinewidths = [col.get_linewidth()[0] for lw in CS.collections] + # Wishlist: Make colorbar lines auto-follow changes in contour lines. ColorbarBase.add_lines(self, CS.levels, tcolors, tlinewidths, erase=erase)