On Tue, Feb 14, 2012 at 10:33 AM, Olе Streicher <ole-usenet-s...@gmx.net>wrote:
> Tony Yu <tsy...@gmail.com> writes:
> > Does the following do what you need?
> >
> > #----
> > import numpy as np
> > import matplotlib.pyplot as plt
> >
> > width = 0.5
> > height = 10
> >
> > for x in np.arange(11):
> > strip = np.random.random(size=(50, 1))
> > plt.imshow(strip, extent=(x-width/2, x+width/2, 0, height))
> >
> > plt.xlim(-width, x+width)
> >
> > plt.show()
> > #----
>
> Not completely since it requires an equally spaced "strip". I have two
> vectors (one for the vertical axis, one for the data).
>
> Best regards
>
> Ole
>
>
I'm not sure what you mean by equally spaced strip. If you need to scale
the height, you can just calculate it as from the length of the strip. If
you mean the placement of the strips, you can substitue the x values above
with your data instead of the `arange` call---you'd have to appropriately
scale `width` so that matches your x-spacing.
-Tony
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users