I'm trying to make multiple line plots, each with a different color, using the 
xyplot command. Specifically, I have an NxK matrix Y and an Nx1 matrix x. I 
would like the plot to contain a line for each (x, Y[,i]), i=1:K. I know 
something like 

xyplot(Y[,1] + Y[,2] + Y[,3] ~ x, type='l')

will work, but if Y is large, this notation can get very awkward. Is there a 
way to do something simpler, along the lines of 

xyplot(Y ~ x, type='l')

Thanks.

- Elliot

--
Elliot Joel Bernstein, Ph.D. | Research Associate | FDO Partners, LLC
134 Mount Auburn Street | Cambridge, MA | 02138
Phone: (617) 503-4619 | Email: elliot.bernst...@fdopartners.com

______________________________________________
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