Skip to content
Prev 7178 / 15075 Next

color lines by group membership in spaghetti plot

On 14 May 2010, at 17:36, Jack Monpas-Huber wrote:

            
I suspect this is more for R-help than for R-mac, but I suspect that:

function.for.spaghetti.plot(data, col = your.color.vector)
your.color.vector = a vector of color, of length equal to that of the students, where students that you want to have the same color (say student 1and 3) are coded as the same color (say 'red', 'blue', 'red')

Google spaghetti plots and R, it might prove helpful. And check the help for legend()

F


--
Federico C. F. Calboli
Department of Epidemiology and Biostatistics
Imperial College, St. Mary's Campus
Norfolk Place, London W2 1PG

Tel +44 (0)20 75941602   Fax +44 (0)20 75943193

f.calboli [.a.t] imperial.ac.uk
f.calboli [.a.t] gmail.com