Last change
on this file since 3130 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
|
Rev | Line | |
---|
[111] | 1 | """
|
---|
| 2 | ASAP plotting class based on matplotlib.
|
---|
| 3 | """
|
---|
| 4 |
|
---|
[708] | 5 | from asap.asaplotbase import *
|
---|
[111] | 6 |
|
---|
[708] | 7 | from matplotlib.backends.backend_agg import FigureCanvasAgg
|
---|
[1819] | 8 | from matplotlib.backend_bases import FigureManagerBase
|
---|
[2451] | 9 | from matplotlib import _pylab_helpers
|
---|
[111] | 10 |
|
---|
[708] | 11 | class 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)
|
---|
[2538] | 28 | self.figmgr = FigureManagerBase(self.canvas,0)
|
---|
[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 |
|
---|
[2538] | 35 | def quit(self):
|
---|
| 36 | # never dextroy non-GUI plotter.
|
---|
| 37 | pass
|
---|
| 38 |
|
---|
[2146] | 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.