source: trunk/python/asaplot.py@ 2493

Last change on this file since 2493 was 2483, checked in by Malte Marquarding, 13 years ago

debian lenny seems to fail here. NOTE we are mixing pyplot api with object oriented one when using gcf

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
RevLine 
[111]1"""
2ASAP plotting class based on matplotlib.
3"""
4
[708]5from asap.asaplotbase import *
[111]6
[708]7from matplotlib.backends.backend_agg import FigureCanvasAgg
[1819]8from matplotlib.backend_bases import FigureManagerBase
[2451]9from matplotlib import _pylab_helpers
[111]10
[708]11class asaplot(asaplotbase):
[111]12 """
13 ASAP plotting class based on matplotlib.
14 """
[1564]15 def __init__(self, rows=1, cols=0, title='', size=None, buffering=False):
[1826]16 """
17 Create a new instance of the ASAPlot plotting class.
[119]18
[1826]19 If rows < 1 then a separate call to set_panels() is required to define
20 the panel layout; refer to the doctext for set_panels().
21 """
[708]22 v = vars()
23 del v['self']
24 asaplotbase.__init__(self,**v)
[2451]25 _pylab_helpers.Gcf.destroy(0)
26 self.window = None
[708]27 self.canvas = FigureCanvasAgg(self.figure)
[1819]28 self.figmgr = FigureManagerBase(self.canvas,1)
[2483]29 # This seems necessary when using Gcf, as this is done in
30 # pyplot.figure. Otherwise this can cause atexit errors at cleanup
31
32 self.figmgr._cidgcf = None
[2451]33 _pylab_helpers.Gcf.figs[self.figmgr.num] = self.figmgr
[2146]34
35 def map(self):
36 """ This method is not available in non-GUI plotting class"""
37 pass
38
39 def unmap(self):
40 """ This method is not available in non-GUI plotting class"""
41 pass
42
Note: See TracBrowser for help on using the repository browser.