Changeset 257 for trunk/python
- Timestamp:
- 01/21/05 22:28:02 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapplotter.py
r226 r257 39 39 self._lmap = [] 40 40 self._title = None 41 self._ordinate = None 42 self._abcissa = None 41 43 42 44 def _translate(self, name): … … 106 108 tlab = scan._getsourcename(i) 107 109 x,xlab = scan.get_abcissa(i) 108 y = scan.getspectrum(i) 109 ylab = 'Flux ('+scan.get_fluxunit()+')' 110 m = scan.getmask(i) 110 if self._abcissa: xlab = self._abcissa 111 y = scan._getspectrum(i) 112 if self._ordinate: 113 ylab = self._ordinate 114 else: 115 ylab = 'Flux ('+scan.get_fluxunit()+')' 116 m = scan._getmask(i) 111 117 if self._lmap and len(self._lmap) > 0: 112 118 llab = self._lmap[j] … … 149 155 tlab = scan._getsourcename() 150 156 x,xlab = scan.get_abcissa() 151 y = scan.getspectrum() 152 ylab = 'Flux ('+scan.get_fluxunit()+')' 153 m = scan.getmask() 154 if len(self._lmap) > 0: 157 if self._abcissa: xlab = self._abcissa 158 y = scan._getspectrum() 159 if self._ordinate: 160 ylab = self._ordinate 161 else: 162 ylab = 'Flux ('+scan.get_fluxunit()+')' 163 m = scan._getmask() 164 if self._lmap and len(self._lmap) > 0: 155 165 llab = self._lmap[j] 156 166 else: … … 186 196 self._plotter.palette(0) 187 197 k=0 188 j=i198 #j=i 189 199 eval(cdict.get(self._panels)) 190 200 for j in range(ncol): … … 199 209 m = None 200 210 x,xlab = scan.get_abcissa(k) 201 y = scan.getspectrum(k) 202 ylab = 'Flux ('+scan.get_fluxunit()+')' 203 m = scan.getmask(k) 211 if self._abcissa: xlab = self._abcissa 212 y = scan._getspectrum(k) 213 if self._ordinate: 214 ylab = self._ordinate 215 else: 216 ylab = 'Flux ('+scan.get_fluxunit()+')' 217 m = scan._getmask(k) 204 218 if colmode == 's' or colmode == 't': 205 219 if not self._title: … … 213 227 else: 214 228 if self._title and len(self._title) > 0: 215 tlab = self._title[ k]229 tlab = self._title[i] 216 230 else: 217 tlab = s can._getsourcename(k)231 tlab = self._ldict.get(self._panels)+' '+str(i) 218 232 if self._lmap and len(self._lmap) > 0: 219 233 llab = self._lmap[j] … … 294 308 return 295 309 296 def set_legend _map(self, mp=[]):310 def set_legend(self, mp=None): 297 311 """ 298 312 Specify a mapping for the legend instead of using the default … … 319 333 return 320 334 335 def set_ordinate(self, ordinate=None): 336 self._ordinate = ordinate 337 if self._data: self.plot() 338 return 339 340 def set_abcissa(self, abcissa=None): 341 self._abcissa = abcissa 342 if self._data: self.plot() 343 return 344 345 346 321 347 if __name__ == '__main__': 322 348 plotter = asapplotter()
Note:
See TracChangeset
for help on using the changeset viewer.