When plotting multiple data with one Axes.hist call, the method's
interface allows you to specify a list of labels to the 'label' kwarg
to distinguish between the datasets.  To get different colors,
however, you cannot give a list of colors to 'color'; instead, you
have to leave out the 'color' kwarg and change the color cycle.

Is there any reason why the color kwarg can't work like label?  I
spent an hour or two trying to debug a script before I realized that
'color' wasn't being interpreted as I expected.  I realize that there
is some ambiguity since a color argument can be an rgb or rgba
sequence.  My proposal would be that 'color' would be interpreted as a
list of distinct colors only when multiple datasets are given as input
and len(color) equals the number of datasets.

I find it hard to imagine a case where you would want to set all
datasets to be the same color, so I don't think the ambiguity would be
a major issue.  I would be happy to write and submit an implementation
if others think this is a reasonable idea.

Cheers,
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to