8000 MNT: deprecate filled parameter to colorbar · matplotlib/matplotlib@4bb60f8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4bb60f8

Browse files
committed
MNT: deprecate filled parameter to colorbar
The *filled* kwarg doesn't directly do anything and filling is completely controlled by the mappable. OTOH, maybe we want to reinstate the ability of *filled* to fill contours?
1 parent 7cc7858 commit 4bb60f8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/matplotlib/colorbar.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ class Colorbar:
370370

371371
n_rasterize = 50 # rasterize solids if number of colors >= n_rasterize
372372

373+
@_api.delete_parameter("3.6", "filled")
373374
def __init__(self, ax, mappable=None, *, cmap=None,
374375
norm=None,
375376
alpha=None,
@@ -450,7 +451,7 @@ def __init__(self, ax, mappable=None, *, cmap=None,
450451
self.spacing = spacing
451452
self.orientation = orientation
452453
self.drawedges = drawedges
453-
self.filled = filled
454+
self._filled = filled
454455
self.extendfrac = extendfrac
455456
self.extendrect = extendrect
456457
self.solids = None
@@ -530,6 +531,8 @@ def _cbar_cla(self):
530531
# Also remove ._patch after deprecation elapses.
531532
patch = _api.deprecate_privatize_attribute("3.5", alternative="ax")
532533

534+
filled = _api.deprecate_privatize_attribute("3.6")
535+
533536
def update_normal(self, mappable):
534537
"""
535538
Update solid patches, lines, etc.
@@ -599,7 +602,7 @@ def draw_all(self):
599602
# boundary norms + uniform spacing requires a manual locator.
600603
self.update_ticks()
601604

602-
if self.filled:
605+
if self._filled:
603606
ind = np.arange(len(self._values))
604607
if self._extend_lower():
605608
ind = ind[1:]
@@ -671,7 +674,7 @@ def _do_extends(self, extendlen):
671674

672675
# xyout is the path for the spine:
673676
self.outline.set_xy(xyout)
674-
if not self.filled:
677+
if not self._filled:
675678
return
676679

677680
# Make extend triangles or rectangles filled patches. These are

0 commit comments

Comments
 (0)
0