diff --git a/fluents/plots.py b/fluents/plots.py index 0795792..7230e1b 100644 --- a/fluents/plots.py +++ b/fluents/plots.py @@ -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