Changeset 2604
- Timestamp:
- 07/20/12 15:00:14 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapplotter.py
r2603 r2604 78 78 self._linestyles = None 79 79 self._legendloc = None 80 81 def __del__(self): 82 print "Destructor of sd.plotter" 83 del self._data 84 if self._plotter: self._plotter.quit() 80 85 81 86 def _translate(self, instr): … … 412 417 from asap import scantable 413 418 if isinstance(scan, scantable): 414 if self._data is not None: 415 if scan != self._data: 416 del self._data 417 self._data = scan 418 # reset 419 self._reset() 420 msg = "A new scantable is set to the plotter. "\ 421 "The masks and data selections are reset." 422 asaplog.push( msg ) 423 else: 424 self._data = scan 425 self._reset() 419 if (self._data is not None) and (scan != self._data): 420 del self._data 421 msg = "A new scantable is set to the plotter. "\ 422 "The masks and data selections are reset." 423 asaplog.push( msg ) 424 self._data = scan 425 # reset 426 self._reset() 426 427 else: 427 428 msg = "Input is not a scantable" … … 1615 1616 msg = "No scantable is specified to plot" 1616 1617 raise TypeError(msg) 1617 if isinstance(scan, scantable): 1618 if self._data is not None: 1619 if scan != self._data: 1620 self._data = scan 1621 # reset 1622 self._reset() 1623 else: 1624 self._data = scan 1625 self._reset() 1626 elif not self._data: 1627 msg = "Input is not a scantable" 1628 raise TypeError(msg) 1629 1618 if scan: 1619 self.set_data(scan, refresh=False) 1620 del scan 1621 1630 1622 # Rows and cols 1631 1623 if rows: … … 1750 1742 self._plotter.hold() 1751 1743 self._plotter.clear() 1744 self._plotter.legend() 1752 1745 1753 1746 # Adjust subplot margins
Note:
See TracChangeset
for help on using the changeset viewer.