Changeset 2714 for trunk/python
- Timestamp:
- 01/07/13 17:26:45 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapplotter.py
r2704 r2714 112 112 self._plotter.legend(self._legendloc) 113 113 114 ### TODO: it's probably better to define following two methods in 115 ### backend dependent class. 114 116 def _new_custombar(self): 115 117 backend=matplotlib.get_backend() … … 130 132 return True 131 133 return False 134 ### end of TODO 132 135 133 136 def _assert_plotter(self,action="status",errmsg=None): … … 276 279 277 280 278 ### Forwards to m atplotlib axes ###281 ### Forwards to methods in matplotlib axes ### 279 282 def text(self, *args, **kwargs): 280 283 self._assert_plotter(action="reload") … … 415 418 del self._data 416 419 msg = "A new scantable is set to the plotter. "\ 417 "The masks and data selections are reset."418 asaplog.push( msg)420 "The masks, data selections, and labels are reset." 421 asaplog.push(msg) 419 422 self._data = scan 420 423 # reset … … 905 908 msg = "Can only set mask after a first call to plot()" 906 909 raise RuntimeError(msg) 907 if len(mask):910 if (mask is not None) and len(mask): 908 911 if isinstance(mask, list) or isinstance(mask, tuple): 909 912 self._usermask = array(mask) … … 926 929 ### Reset methods ### 927 930 def _reset(self): 928 self._usermask = [] 929 self._usermaskspectra = None 931 """Reset method called when new data is set""" 932 # reset selections and masks 933 self.set_selection(None, False) 934 self.set_mask(None, None, False) 935 # reset offset 930 936 self._offset = None 931 self.set_selection(None, False)937 # reset header 932 938 self._reset_header() 939 # reset labels 940 self._lmap = None # related to stack 941 self.set_title(None, None, False) 942 self.set_ordinate(None, None, False) 943 self.set_abcissa(None, None, False) 933 944 934 945 def _reset_header(self):
Note:
See TracChangeset
for help on using the changeset viewer.