Changeset 1021
- Timestamp:
- 04/19/06 11:03:02 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapplotter.py
r1018 r1021 37 37 self._maskselection = None 38 38 self._selection = selector() 39 39 self._hist = None 40 if rcParams['plotter.histogram']: self._hist = "steps" 41 else: self._hist = "-" 42 40 43 def _translate(self, instr): 41 44 keys = "s b i p t".split() … … 218 221 Set the y-axis label of the plot. If multiple panels are plotted, 219 222 multiple labels have to be specified. 223 Parameters: 224 ordinate: a list of ordinate labels. None (default) let 225 data determine the labels 220 226 Example: 221 227 # two panels are visible on the plotter … … 230 236 Set the x-axis label of the plot. If multiple panels are plotted, 231 237 multiple labels have to be specified. 238 Parameters: 239 abcissa: a list of abcissa labels. None (default) let 240 data determine the labels 232 241 Example: 233 242 # two panels are visible on the plotter … … 242 251 Set the colors to be used. The plotter will cycle through 243 252 these colors when lines are overlaid (stacking mode). 253 Parameters: 254 colormap: a list of colour names 244 255 Example: 245 256 plotter.set_colors("red green blue") … … 253 264 if self._data: self.plot(self._data) 254 265 266 def set_histogram(self, hist=True): 267 """ 268 Enable/Disable histogram-like plotting. 269 Parameters: 270 hist: True (default) or False. The fisrt default 271 is taken from the .asaprc setting 272 plotter.histogram 273 """ 274 if hist: self._hist = "steps" 275 else: self._hist = "-" 276 if self._data: self.plot(self._data) 277 255 278 def set_linestyles(self, linestyles): 256 279 """ … … 441 464 y = y[s:e] 442 465 m = m[s:e] 443 if len(x) > 1024 and True:#rcParams['plotter.decimate']:444 fac = len(x)/ 1024466 if len(x) > 2048 and rcParams['plotter.decimate']: 467 fac = len(x)/2048 445 468 x = x[::fac] 446 469 m = m[::fac] … … 455 478 llbl = self._get_label(scan, r, self._stacking, None) 456 479 self._plotter.set_line(label=llbl) 480 self._plotter.set_line(linestyle=self._hist) 457 481 self._plotter.plot(x,y,m) 458 482 xlim= self._minmaxx or [min(x),max(x)]
Note:
See TracChangeset
for help on using the changeset viewer.