Hi all, I am a matplotlib user. I am new to this list. Please pardon me if it is not the right place to post it. I was looking for an automated way to generate colors for the plots when the number of lines is high (15+). I ended up writing these lines. If you think they can be useful to others, here they are. Cheers, Luca
import scipy as S def gen_color(): i = 1. while 1: c = S.frexp(i)[0] * 2 c = .2 * (1 + S.sin(12 * S.pi * c)) + .3 * (1 + S.sin(2 * S.pi * (c + [0., 1./3, 2./3]))) yield c i += 2 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel