Changeset 1724 for branches/alma/python
- Timestamp:
- 04/21/10 20:42:50 (15 years ago)
- Location:
- branches/alma/python
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma/python/asapplotter.py
r1723 r1724 18 18 self._visible = visible 19 19 self._plotter = self._newplotter() 20 if self._visible and matplotlib.get_backend() == "TkAgg": 21 from asap.casatoolbar import CustomToolbarTkAgg 22 self._plotter.figmgr.casabar = CustomToolbarTkAgg(self) 20 23 21 24 self._panelling = None … … 50 53 51 54 def _newplotter(self): 52 if self._visible: 55 backend=matplotlib.get_backend() 56 if not self._visible: 57 from asap.asaplot import asaplot 58 elif backend == 'TkAgg': 53 59 from asap.asaplotgui import asaplotgui as asaplot 60 elif backend == 'Qt4Agg': 61 from asap.asaplotgui_qt4 import asaplotgui as asaplot 62 elif backend == 'GTkAgg': 63 from asap.asaplotgui_gtk import asaplotgui as asaplot 54 64 else: 55 65 from asap.asaplot import asaplot … … 84 94 if self._minmaxy is not None: 85 95 self._plotter.set_limits(ylim=self._minmaxy) 96 if self._plotter.figmgr.casabar: self._plotter.figmgr.casabar.enable_button() 86 97 self._plotter.release() 87 98 self._plotter.tidy() … … 1037 1048 self._plotter.figure.subplots_adjust( 1038 1049 left=lef,bottom=bot,right=rig,top=top,wspace=wsp,hspace=hsp) 1050 if self._plotter.figmgr.casabar: self._plotter.figmgr.casabar.disable_button() 1039 1051 self._plottp(self._data) 1040 1052 if self._minmaxy is not None: … … 1153 1165 print_log() 1154 1166 del ssum 1167 1168 -
branches/alma/python/interactivemask.py
r1667 r1724 159 159 # Need replot 160 160 self.p.plot(self.scan) 161 # disable casa toolbar 162 if self.p._plotter.figmgr.casabar: self.p._plotter.figmgr.casabar.disable_button() 161 163 for panel in self.p._plotter.subplots: 162 164 xmin, xmax = panel['axes'].get_xlim()
Note:
See TracChangeset
for help on using the changeset viewer.