Last change
on this file since 2777 was 2538, checked in by Kana Sugimoto, 13 years ago |
New Development: No
JIRA Issue: Yes (related to CAS-3749)
Ready for Test: Yes
Interface Changes: Yes
What Interface Changed: added a new method, _alive(), in asaplotbase class
Test Programs: Interactive tests
Put in Release Notes: No
Module(s):
Description:
Added a new method, _alive(), in asaplotbase class. The method return True
if asaplot instance is alive. More complete check compared to 'is_dead' parameter.
asapplotter._assert_plotter method is simplified by calling this function.
Fixed misc bugs found in interactive tests.
- set back linewidth = 1 in plots invoked by modules, interactivemask, asapmath,
and asapfitter.
- interactivemask module: plotter in properly quited at the end.
- interactivemask module: avoid error when user close interacive plot window
before calling the finalization method, finish_selection().
- added definition of a dummy function, quit(), in asaplot class.
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.4 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,0)
|
---|
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 quit(self):
|
---|
36 | # never dextroy non-GUI plotter.
|
---|
37 | pass
|
---|
38 |
|
---|
39 | def map(self):
|
---|
40 | """ This method is not available in non-GUI plotting class"""
|
---|
41 | pass
|
---|
42 |
|
---|
43 | def unmap(self):
|
---|
44 | """ This method is not available in non-GUI plotting class"""
|
---|
45 | pass
|
---|
46 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.