|
From: Jeff K. <kl...@wi...> - 2010-03-26 19:28:10
|
I was not aware of color cycles, but it looks like this is the way to
go about solving my problem.
Below is an example that actually works.
----------------------------------
import pylab as P
mu, sigma = 200, 25
x0 = mu + sigma*P.randn(10000)
x1 = mu + sigma*P.randn(7000)
x2 = mu + sigma*P.randn(3000)
# Set the color cycle of the axes rather than using a kwarg
P.gca().set_color_cycle([(0.5,0.,0.),
(0.,0.5,0.),
(0.,0.,0.5)])
n, bins, patches = P.hist([x0,x1,x2], 50, normed=1, histtype='bar')
P.show()
-----------------------------------
|