@@ -360,6 +360,7 @@ class Colorbar:
360
360
361
361
n_rasterize = 50 # rasterize solids if number of colors >= n_rasterize
362
362
363
+ @_api .delete_parameter ("3.6" , "filled" )
363
364
def __init__ (self , ax , mappable = None , * , cmap = None ,
364
365
norm = None ,
365
366
alpha = None ,
@@ -440,7 +441,7 @@ def __init__(self, ax, mappable=None, *, cmap=None,
440
441
self .spacing = spacing
441
442
self .orientation = orientation
442
443
self .drawedges = drawedges
443
- self .filled = filled
444
+ self ._filled = filled
444
445
self .extendfrac = extendfrac
445
446
self .extendrect = extendrect
446
447
self .solids = None
@@ -489,7 +490,7 @@ def __init__(self, ax, mappable=None, *, cmap=None,
489
490
self .formatter = ticker .StrMethodFormatter (format )
490
491
else :
491
492
self .formatter = format # Assume it is a Formatter or None
492
- self .draw_all ()
493
+ self ._draw_all ()
493
494
494
495
if isinstance (mappable , contour .ContourSet ) and not mappable .filled :
495
496
self .add_lines (mappable )
@@ -520,6 +521,8 @@ def _cbar_cla(self):
520
521
# Also remove ._patch after deprecation elapses.
521
522
patch = _api .deprecate_privatize_attribute ("3.5" , alternative = "ax" )
522
523
524
+ filled = _api .deprecate_privatize_attribute ("3.6" )
525
+
523
526
def update_normal (self , mappable ):
524
527
"""
525
528
Update solid patches, lines, etc.
@@ -541,14 +544,22 @@ def update_normal(self, mappable):
541
544
self .norm = mappable .norm
542
545
self ._reset_locator_formatter_scale ()
543
546
544
- self .draw_all ()
547
+ self ._draw_all ()
545
548
if isinstance (self .mappable , contour .ContourSet ):
546
549
CS = self .mappable
547
550
if not CS .filled :
548
551
self .add_lines (CS )
549
552
self .stale = True
550
553
554
+ @_api .deprecated ("3.6" , alternative = "fig.draw_without_rendering()" )
551
555
def draw_all (self ):
556
+ """
557
+ Calculate any free parameters based on the current cmap and norm,
558
+ and do all the drawing.
559
+ """
560
+ self ._draw_all ()
561
+
562
+ def _draw_all (self ):
552
563
"""
553
564
Calculate any free parameters based on the current cmap and norm,
554
565
and do all the drawing.
@@ -589,7 +600,7 @@ def draw_all(self):
589
600
# boundary norms + uniform spacing requires a manual locator.
590
601
self .update_ticks ()
591
602
592
- if self .filled :
603
+ if self ._filled :
593
604
ind = np .arange (len (self ._values ))
594
605
if self ._extend_lower ():
595
606
ind = ind [1 :]
@@ -661,7 +672,7 @@ def _do_extends(self, extendlen):
661
672
662
673
# xyout is the path for the spine:
663
674
self .outline .set_xy (xyout )
664
- if not self .filled :
675
+ if not self ._filled :
665
676
return
666
677
667
678
# Make extend triangles or rectangles filled patches. These are
0 commit comments