8000 Deprecate colorbar.draw_all. · matplotlib/matplotlib@10b3de9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 10b3de9

Browse files
committed
Deprecate colorbar.draw_all.
1 parent 4bb60f8 commit 10b3de9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

lib/matplotlib/colorbar.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ def __init__(self, ax, mappable=None, *, cmap=None,
500500
self.formatter = ticker.StrMethodFormatter(format)
501501
else:
502502
self.formatter = format # Assume it is a Formatter or None
503-
self.draw_all()
503+
self._draw_all()
504504

505505
if isinstance(mappable, contour.ContourSet) and not mappable.filled:
506506
self.add_lines(mappable)
@@ -554,14 +554,22 @@ def update_normal(self, mappable):
554554
self.norm = mappable.norm
555555
self._reset_locator_formatter_scale()
556556

557-
self.draw_all()
557+
self._draw_all()
558558
if isinstance(self.mappable, contour.ContourSet):
559559
CS = self.mappable
560560
if not CS.filled:
561561
self.add_lines(CS)
562562
self.stale = True
563563

564+
@_api.deprecated("3.6", alternative="fig.draw_without_rendering()")
564565
def draw_all(self):
566+
"""
567+
Calculate any free parameters based on the current cmap and norm,
568+
and do all the drawing.
569+
"""
570+
self._draw_all()
571+
572+
def _draw_all(self):
565573
"""
566574
Calculate any free parameters based on the current cmap and norm,
567575
and do all the drawing.

0 commit comments

Comments
 (0)
0