Changeset 1096
- Timestamp:
- 07/31/06 12:20:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapplotter.py
r1087 r1096 181 181 return 182 182 183 def set_legend(self, mp=None ):183 def set_legend(self, mp=None, mode = 0): 184 184 """ 185 185 Specify a mapping for the legend instead of using the default 186 186 indices: 187 187 Parameters: 188 188 mp: a list of 'strings'. This should have the same length 189 189 as the number of elements on the legend and then maps 190 190 to the indeces in order. It is possible to uses latex 191 191 math expression. These have to be enclosed in r'', e.g. r'$x^{2}$' 192 mode: where to display the legend 193 Any other value for loc else disables the legend: 194 0: auto 195 1: upper right 196 2: upper left 197 3: lower left 198 4: lower right 199 5: right 200 6: center left 201 7: center right 202 8: lower center 203 9: upper center 204 10: center 192 205 193 206 Example: … … 200 213 """ 201 214 self._lmap = mp 202 if self._data: self.plot(self._data) 215 self._plotter.legend(mode) 216 if self._data: 217 self.plot(self._data) 203 218 return 204 219 … … 461 476 x = x[s:e] 462 477 y = y[s:e] 463 if len(x) > 2048and rcParams['plotter.decimate']:464 fac = len(x)/ 2048478 if len(x) > 1024 and rcParams['plotter.decimate']: 479 fac = len(x)/1024 465 480 x = x[::fac] 466 481 y = y[::fac]
Note:
See TracChangeset
for help on using the changeset viewer.