Ignore:
Timestamp:
05/18/12 19:44:44 (12 years ago)
Author:
Kana Sugimoto
Message:

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.

  1. set back linewidth = 1 in plots invoked by modules, interactivemask, asapmath, and asapfitter.
  2. interactivemask module: plotter in properly quited at the end.
  3. interactivemask module: avoid error when user close interacive plot window before calling the finalization method, finish_selection().
  4. added definition of a dummy function, quit(), in asaplot class.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapplotter.py

    r2535 r2538  
    140140                       when plot window is not alive.
    141141        """
    142         isAlive = (self._plotter != None and not self._plotter.is_dead)
     142        isAlive = (self._plotter is not None) and self._plotter._alive()
    143143        # More tests
    144         if isAlive:
    145             if self._plotter.figmgr:
    146                 figmgr = self._plotter.figmgr
    147                 figid = figmgr.num
    148                 # Make sure figid=0 is what asapplotter expects.
    149                 # It might be already destroied/overridden by matplotlib
    150                 # commands or other plotting methods using asaplot.
    151                 isAlive = _pylab_helpers.Gcf.has_fignum(figid) and \
    152                           (figmgr == \
    153                            _pylab_helpers.Gcf.get_fig_manager(figid))
    154             else:
    155                 isAlive = False
     144        #if isAlive:
     145        #    if self._plotter.figmgr:
     146        #        figmgr = self._plotter.figmgr
     147        #        figid = figmgr.num
     148        #        # Make sure figid=0 is what asapplotter expects.
     149        #        # It might be already destroied/overridden by matplotlib
     150        #        # commands or other plotting methods using asaplot.
     151        #        isAlive = _pylab_helpers.Gcf.has_fignum(figid) and \
     152        #                  (figmgr == \
     153        #                   _pylab_helpers.Gcf.get_fig_manager(figid))
     154        #    else:
     155        #        isAlive = False
    156156           
    157157        if isAlive:
Note: See TracChangeset for help on using the changeset viewer.