On Tue, Feb 14, 2012 at 9:48 AM, Olе Streicher <ole-usenet-s...@gmx.net>wrote:
> Hi list,
>
> I have a list of 48 individual data sets (lambda,y) which I want to plot in
> the following diagram:
>
> lambda
> ^
> |
> |
> |
> |
> +--------------->
> 1 2 3 4 5 6 .. Dataset #
>
> The "y" values should be color coded here, in a similar fashion as it is
> done in a color bar (f.e. that I can interpolate between data points).
>
> Practically, I want to have 48 vertical color bars here, all with the
> same scaling. From the documentation, I could not find out how to do
> this; and also I could not find a good example for this.
>
> Could anyone help me here?
>
> Best
>
> Ole
>
>
>
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()
#----
-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