casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
asaplot.py
Go to the documentation of this file.
00001 """
00002 ASAP plotting class based on matplotlib.
00003 """
00004 
00005 from asap.asaplotbase import *
00006 
00007 from matplotlib.backends.backend_agg import FigureCanvasAgg
00008 from matplotlib.backend_bases import FigureManagerBase
00009 from matplotlib import _pylab_helpers
00010 
00011 class asaplot(asaplotbase):
00012     """
00013     ASAP plotting class based on matplotlib.
00014     """
00015     def __init__(self, rows=1, cols=0, title='', size=None, buffering=False):
00016         """
00017         Create a new instance of the ASAPlot plotting class.
00018 
00019         If rows < 1 then a separate call to set_panels() is required to define
00020         the panel layout; refer to the doctext for set_panels().
00021         """
00022         v = vars()
00023         del v['self']
00024         asaplotbase.__init__(self,**v)
00025         _pylab_helpers.Gcf.destroy(0)
00026         self.window = None
00027         self.canvas = FigureCanvasAgg(self.figure)
00028         self.figmgr = FigureManagerBase(self.canvas,0)
00029         # This seems necessary when using Gcf, as this is done in
00030         # pyplot.figure. Otherwise this can cause atexit errors at cleanup
00031         
00032         self.figmgr._cidgcf = None
00033         _pylab_helpers.Gcf.figs[self.figmgr.num] = self.figmgr
00034 
00035     def quit(self):
00036         # never dextroy non-GUI plotter.
00037         pass
00038 
00039     def map(self):
00040         """ This method is not available in non-GUI plotting class"""
00041         pass
00042 
00043     def unmap(self):
00044         """ This method is not available in non-GUI plotting class"""
00045         pass
00046