Changeset 2150 for trunk/python/scantable.py
- Timestamp:
- 04/22/11 18:21:29 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r2144 r2150 2030 2030 2031 2031 if plot: 2032 if rcParams['plotter.gui']: 2033 from asap.asaplotgui import asaplotgui as asaplot 2034 else: 2035 from asap.asaplot import asaplot 2036 self._p=asaplot() 2037 self._p.set_panels() 2032 from asap.asapplotter import new_asaplot 2033 theplot = new_asaplot(rcParams['plotter.gui']) 2034 theplot.set_panels() 2038 2035 ylab=s._get_ordinate_label() 2039 # self._p.palette(0,["#777777","red"])2036 #theplot.palette(0,["#777777","red"]) 2040 2037 for r in xrange(s.nrow()): 2041 2038 xsm=s._getabcissa(r) … … 2043 2040 xorg=orgscan._getabcissa(r) 2044 2041 yorg=orgscan._getspectrum(r) 2045 self._p.clear()2046 self._p.hold()2047 self._p.set_axes('ylabel',ylab)2048 self._p.set_axes('xlabel',s._getabcissalabel(r))2049 self._p.set_axes('title',s._getsourcename(r))2050 self._p.set_line(label='Original',color="#777777")2051 self._p.plot(xorg,yorg)2052 self._p.set_line(label='Smoothed',color="red")2053 self._p.plot(xsm,ysm)2042 theplot.clear() 2043 theplot.hold() 2044 theplot.set_axes('ylabel',ylab) 2045 theplot.set_axes('xlabel',s._getabcissalabel(r)) 2046 theplot.set_axes('title',s._getsourcename(r)) 2047 theplot.set_line(label='Original',color="#777777") 2048 theplot.plot(xorg,yorg) 2049 theplot.set_line(label='Smoothed',color="red") 2050 theplot.plot(xsm,ysm) 2054 2051 ### Ugly part for legend 2055 2052 for i in [0,1]: 2056 self._p.subplots[0]['lines'].append([self._p.subplots[0]['axes'].lines[i]])2057 self._p.release()2053 theplot.subplots[0]['lines'].append([theplot.subplots[0]['axes'].lines[i]]) 2054 theplot.release() 2058 2055 ### Ugly part for legend 2059 self._p.subplots[0]['lines']=[]2056 theplot.subplots[0]['lines']=[] 2060 2057 res = raw_input("Accept smoothing ([y]/n): ") 2061 2058 if res.upper() == 'N': 2062 2059 s._setspectrum(yorg, r) 2063 self._p.unmap()2064 self._p = None2060 theplot.quit() 2061 del theplot 2065 2062 del orgscan 2066 2063
Note: See TracChangeset
for help on using the changeset viewer.