Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 78aabc3

Browse files
committed
MNT : remove set_colorbar from ScalarMappable
Deprecated in #2055 / 148ed82
1 parent a78746d commit 78aabc3

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

doc/api/api_changes/code_removal.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,8 @@ remove 'faceted' as a valid value for `shading` in ``tri.tripcolor``
4747
--------------------------------------------------------------------
4848
Use `edgecolor` instead. Added validation on ``shading`` to
4949
only be valid values.
50+
51+
52+
Remove ``set_colorbar`` method from ``ScalarMappable``
53+
------------------------------------------------------
54+
Remove ``set_colorbar`` method, use `colorbar` attribute directly.

lib/matplotlib/cm.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,6 @@ def __init__(self, norm=None, cmap=None):
200200
self.colorbar = None
201201
self.update_dict = {'array': False}
202202

203-
@cbook.deprecated('1.3', alternative='the colorbar attribute')
204-
def set_colorbar(self, im, ax):
205-
"""set the colorbar and axes instances associated with mappable"""
206-
self.colorbar = im
207-
208203
def to_rgba(self, x, alpha=None, bytes=False):
209204
"""
210205
Return a normalized rgba array corresponding to *x*.

0 commit comments

Comments
 (0)