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

Skip to content

Commit 576d6d0

Browse files
committed
fixed some problems with colorbar updates in interactive mode
svn path=/trunk/matplotlib/; revision=806
1 parent d478697 commit 576d6d0

1 file changed

Lines changed: 6 additions & 14 deletions

File tree

lib/matplotlib/image.py

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,21 +98,13 @@ def set_alpha(self, alpha):
9898
Artist.set_alpha(self, alpha)
9999
self._imcache = None
100100

101-
def set_cmap(self, cmap):
102-
'set the colormap for luminance data'
103-
self._imcache = None
104-
cm.ScalarMappable.set_cmap(self, cmap)
105-
106-
107-
def set_norm(self, norm):
108-
'set the colormap for luminance data'
109-
self._imcache = None
110-
cm.ScalarMappable.set_norm(self, norm)
111-
112-
def set_clim(self, vmin=None, vmax=None):
113-
'set the norm limits for image scaling'
101+
def changed(self):
102+
"""
103+
Call this whenever the mappable is changed so observers can
104+
update state
105+
"""
114106
self._imcache = None
115-
cm.ScalarMappable.set_clim(self, vmin, vmax)
107+
cm.ScalarMappable.changed(self)
116108

117109
def make_image(self, flipy):
118110
if self._A is not None:

0 commit comments

Comments
 (0)