Last change
on this file since 2495 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
|
Line | |
---|
1 | """
|
---|
2 | ASAP plotting class based on matplotlib.
|
---|
3 | """
|
---|
4 |
|
---|
5 | from asap.asaplotbase import *
|
---|
6 |
|
---|
7 | from matplotlib.backends.backend_agg import FigureCanvasAgg
|
---|
8 | from matplotlib.backend_bases import FigureManagerBase
|
---|
9 | from matplotlib import _pylab_helpers
|
---|
10 |
|
---|
11 | class asaplot(asaplotbase):
|
---|
12 | """
|
---|
13 | ASAP plotting class based on matplotlib.
|
---|
14 | """
|
---|
15 | def __init__(self, rows=1, cols=0, title='', size=None, buffering=False):
|
---|
16 | """
|
---|
17 | Create a new instance of the ASAPlot plotting class.
|
---|
18 |
|
---|
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 | """
|
---|
22 | v = vars()
|
---|
23 | del v['self']
|
---|
24 | asaplotbase.__init__(self,**v)
|
---|
25 | _pylab_helpers.Gcf.destroy(0)
|
---|
26 | self.window = None
|
---|
27 | self.canvas = FigureCanvasAgg(self.figure)
|
---|
28 | self.figmgr = FigureManagerBase(self.canvas,1)
|
---|
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
|
---|
33 | _pylab_helpers.Gcf.figs[self.figmgr.num] = self.figmgr
|
---|
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.