In the extended histogram demo: http://matplotlib.sourceforge.net/examples/pylab_examples/histogram_demo_extended.html?highlight=codex%20hist
Multiple data are shown in parallel with different colors, using a single hist command. These colors seem to be automatically chosen, however, and I cannot figure out a way to control them. The color kwarg description says that it accepts "matplotlib color arg or sequence of rgba tuples", but giving it a list of rgba tuples raises an error. Am I approaching this the wrong way? Has anybody successfully done this? Example that raises error: ---------------------------------- 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) # The following gives a ValueError from to_rgba n, bins, patches = P.hist([x0,x1,x2], 50, normed=1, histtype='bar', color=[(.5, 0., 0., 1.), (0., .5, 0., 1.),]) P.show() ----------------------------------- Many thanks, Jeff || Jeff Klukas, Research Assistant, Physics || University of Wisconsin -- Madison || jeff.klu...@gmail | jeffyklu...@aim | jeffklu...@skype || http://www.hep.wisc.edu/~jklukas/ ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users