Changeset 2147 for trunk/python
- Timestamp:
- 04/18/11 20:20:40 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapplotter.py
r2123 r2147 88 88 return None 89 89 90 def casabar_exists(self): 91 if not hasattr(self._plotter.figmgr,'casabar'): 92 return False 93 elif self._plotter.figmgr.casabar: 94 return True 95 return False 96 90 97 @asaplog_post_dec 91 98 def plot(self, scan=None): … … 104 111 self._reset_header() 105 112 if self._plotter.is_dead: 106 if hasattr(self._plotter.figmgr,'casabar'):113 if self.casabar_exists(): 107 114 del self._plotter.figmgr.casabar 108 115 self._plotter = self._newplotter() 109 116 self._plotter.figmgr.casabar=self._newcasabar() 110 if self. _plotter.figmgr.casabar:117 if self.casabar_exists(): 111 118 self._plotter.figmgr.casabar.set_pagecounter(1) 112 119 self._panelrows = [] … … 121 128 if self._minmaxy is not None: 122 129 self._plotter.set_limits(ylim=self._minmaxy) 123 if self. _plotter.figmgr.casabar: self._plotter.figmgr.casabar.enable_button()130 if self.casabar_exists(): self._plotter.figmgr.casabar.enable_button() 124 131 self._plotter.release() 125 132 self._plotter.tidy() … … 1034 1041 self._startrow = r+1 1035 1042 self._ipanel += panelcount 1036 if self. _plotter.figmgr.casabar:1043 if self.casabar_exists(): 1037 1044 if self._ipanel >= nptot-1: 1038 1045 self._plotter.figmgr.casabar.disable_next() … … 1285 1292 def plottp(self, scan=None, outfile=None): 1286 1293 if self._plotter.is_dead: 1287 if hasattr(self._plotter.figmgr,'casabar'):1294 if self.casabar_exists(): 1288 1295 del self._plotter.figmgr.casabar 1289 1296 self._plotter = self._newplotter() … … 1316 1323 self._plotter.figure.subplots_adjust( 1317 1324 left=lef,bottom=bot,right=rig,top=top,wspace=wsp,hspace=hsp) 1318 if self. _plotter.figmgr.casabar: self._plotter.figmgr.casabar.disable_button()1325 if self.casabar_exists(): self._plotter.figmgr.casabar.disable_button() 1319 1326 self._plottp(self._data) 1320 1327 if self._minmaxy is not None:
Note:
See TracChangeset
for help on using the changeset viewer.