Changeset 1087


Ignore:
Timestamp:
07/27/06 14:39:36 (18 years ago)
Author:
mar637
Message:

use MA instead of homemade masking; This probably breaks old (woody) versions of mpl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapplotter.py

    r1034 r1087  
    455455                        m = logical_and(m, self._usermask)
    456456                x = scan._getabcissa(r)
     457                from matplotlib.numerix import ma,logical_not,array
     458                y = ma.MA.MaskedArray(y,mask=logical_not(array(m,copy=0)),copy=0)
    457459                if self._minmaxx is not None:
    458460                    s,e = self._slice_indeces(x)
    459461                    x = x[s:e]
    460462                    y = y[s:e]
    461                     m = m[s:e]
    462463                if len(x) > 2048 and rcParams['plotter.decimate']:
    463464                    fac = len(x)/2048
    464465                    x = x[::fac]
    465                     m = m[::fac]
    466466                    y = y[::fac]
    467467                llbl = self._get_label(scan, r, self._stacking, self._lmap)
     
    476476                plotit = self._plotter.plot
    477477                if self._hist: plotit = self._plotter.hist
    478                 plotit(x,y,m)
     478                plotit(x,y)
    479479                xlim= self._minmaxx or [min(x),max(x)]
    480480                allxlim += xlim
    481                 ylim= self._minmaxy or [min(y),max(y)]
     481                ylim= self._minmaxy or [ma.MA.minimum(y),ma.MA.maximum(y)]
    482482                allylim += ylim
    483483                stackcount += 1
Note: See TracChangeset for help on using the changeset viewer.