On Thu, 01 May 2008 22:00:33 +0000, Zoho Vignochi wrote:
> Hello:
>
> I have a script in which I have been using plot to plot numerous lines
> on the same graph. I recently wanted to see how Line Collections work so
> I tried porting it over. Everything successful except I can't seem to
> get each line to be a different color. Here is the relevant section:
>
> # Make a list of colors cycling through the rgbcmyk series.
> colors = [colorConverter.to_rgba(c) for c in
> ('r','g','b','c','y','m','k')]
>
> fig = plt.figure()
> ax = fig.add_subplot(1,1,1)
> lines = collections.LineCollection([zip(L_range, item) for item
> in a_steady])
> lines.set_array(L_range)
> lines.set_color(colors)
> ax.add_collection(lines, autolim=True)
>
> However every line is blue. Any ideas?
>
I should mention my import lines:
import numpy as np
from numpy import sum, zeros, less, where
import scipy as sp
import matplotlib.pyplot as plt
from matplotlib import collections
from matplotlib.colors import colorConverter
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users