added default mappable to None
This commit is contained in:
parent
31ac569c3e
commit
90bb25eb55
|
@ -40,6 +40,7 @@ class Plot(view.View):
|
|||
# init matplotlib related stuff
|
||||
self._background = None
|
||||
self._colorbar = None
|
||||
self._mappable = None
|
||||
self._use_blit = False
|
||||
self.fig = Figure()
|
||||
self.canvas = FigureCanvasGTKAgg(self.fig)
|
||||
|
@ -136,11 +137,8 @@ class Plot(view.View):
|
|||
|
||||
def _toggle_colorbar(self):
|
||||
if self._colorbar == None:
|
||||
# get last created instance of mappable
|
||||
if not self._mappable:
|
||||
self._mappable = matplotlib.pylab.gci()
|
||||
if self._mappable == None:
|
||||
print "No mappable"
|
||||
logger.log('notice', 'No mappable in this plot')
|
||||
return
|
||||
if self._mappable._A != None: # we need colormapping
|
||||
# get axes original position
|
||||
|
|
Reference in New Issue