On 12/5/12 8:36 PM, Dale Lukas Peterson wrote:
> I have a time series of 32-bit unsigned integers in the form of a
> numpy array with dtype=numpy.uint32.  The bits of each integer in
> array correspond to various boolean states collected during an
> experiment.  I would like to make a plot this data in the following
> way:
> 1)  time on the horizontal axis (I have a time array of the same
> length as my integer array)
> 2)  bit position N on the vertical axis (0-1 corresponds to bit 0, 1-2
> corresponds to bit 1, etc.)
> 3)  a solid filled rectangle from (t1, N) to (t1+dt, N+1) whenever the
> bit is high.
>
> I been able to use the bitwise_and() and right_shift() on the data to
> get individual arrays which are populated with only 0's and1's.
>
> What I'm not clear on is now how to get the solid filled rectangle for
> areas where the bit is high and nothing when the bit is low.
>
> Is there already this functionality somewhere in matplotlib?  I looked
> in the gallery and couldn't find anything quite like what I'm looking
> for, though I may have simply missed it.  If there isn't, I'm sure
> there is a way to do it, does anybody have any recommendations as to
> the path of least resistance?

Just FYI, this reminds me a lot of the recent EventRaster discussion:

http://thread.gmane.org/gmane.comp.python.matplotlib.devel/11458/focus=11655

Thanks,

Jason



------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to