From 90bb25eb5530f6ef4a4898e79c58d7898cab0f91 Mon Sep 17 00:00:00 2001 From: flatberg Date: Tue, 24 Apr 2007 17:16:34 +0000 Subject: [PATCH] added default mappable to None --- fluents/plots.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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