Dear R-experts,

   I want to assign different colors to groups of
points, lines and segments in a plot.

  I have a vector(dat$tx) that is going to have a
different number of levels every time the user wants
to plot a set of data. The number of lines is going to
be equal to the number of levels of the vector
mentioned. 

    What I have so far is this:

plot(1,1,type="n")
for (i in dat$tx) {

   points(summ$timep[summ$tx==i],summ$mn[summ$tx==i])
   lines(summ$timep[summ$tx==i],summ$mn[summ$tx==i])
}

How can I assign different colors to the points and
lines?

Thank you in advance for any help,

Judith


      
____________________________________________________________________________________
Be a better friend, newshound, and

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to