I have found a simple and better way. One can chose from colors from a color map:
>>import pylab as pl
>>import matplotlib.cm as cm
>>xval = pl.arange(0, 20, 0.2)
>>for i in range(256):
... pl.plot(xval, pl.sin(xval)+i, c=cm.hot(i), lw=5)
This one if, for instance, picking from a color map called "hot". If one wants to the colors to fade away, or darken, the "alpha" option can be utilized or another color map in which colors darken or fade into another color.
There is no need for a long sophisticated script.
View this message in context: Re: incremental colors for lines
Sent from the matplotlib - users mailing list archive at Nabble.com.