Changeset 2535 for trunk/python/asapplotter.py
- Timestamp:
- 05/17/12 19:00:47 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapplotter.py
r2453 r2535 6 6 from matplotlib.font_manager import FontProperties 7 7 from matplotlib.text import Text 8 from matplotlib import _pylab_helpers 8 9 9 10 import re … … 86 87 return None 87 88 89 @asaplog_post_dec 88 90 def _reload_plotter(self): 89 91 if self._plotter is not None: 90 if not self._plotter.is_dead: 91 # clear lines and axes 92 self._plotter.clear() 92 #if not self._plotter.is_dead: 93 # # clear lines and axes 94 # try: 95 # self._plotter.clear() 96 # except: # Can't remove when already killed. 97 # pass 93 98 if self.casabar_exists(): 94 99 del self._plotter.figmgr.casabar 95 100 self._plotter.quit() 96 101 del self._plotter 102 asaplog.push('Loading new plotter') 97 103 self._plotter = new_asaplot(self._visible,**self._inikwg) 98 104 self._plotter.figmgr.casabar=self._new_custombar() … … 134 140 when plot window is not alive. 135 141 """ 136 if self._plotter and not self._plotter.is_dead: 142 isAlive = (self._plotter != None and not self._plotter.is_dead) 143 # 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 156 157 if isAlive: 137 158 return True 138 159 # Plotter is not alive.
Note: See TracChangeset
for help on using the changeset viewer.