On Wed, Dec 30, 2009 at 12:05 PM, Eric Emsellem <eem...@es...> wrote:
> I have tried with rgba sequences but no luck there. The help of hist
> << color: matplotlib color arg or sequence of rgba tuples >>
>
Based on my quick look at the code, it seems that the documentation is
incorrect. I believe it should be "a tuple of rgba values", not
"sequence of rgba tuples", and I don't think it is possible to specify
color"s" using keyword arguments.
x1 = random(1000)
x2 = random(1000)
n, bins, patches = hist(np.array([x1, x2]).transpose())
plt.setp(patches[0], color="r")
plt.setp(patches[1], color="b")
also see
http://matplotlib.sourceforge.net/examples/pylab_examples/hist_colormapped.html
Regards,
-JJ
p.s., Is it just me who think it is confusing that hist([x1,x2])
interprets input differently when len(x1) == len(x2) and when len(x1)
!= len(x2)?
|