[R] Generating plots with two lines, each line plotted with a different color

Thomas Lumley tlumley at u.washington.edu
Thu May 7 16:11:47 CEST 2009

On Thu, 7 May 2009, John Sorkin wrote:

> R 2.9.0
> windows xp
> I would like to have the two lines generated by my plot have different colors, in addition to the two different line types specified by the plot command below. I would appreciate advice on how I can specify line colors.
> plot(survfit(Surv(Age,Died) ~ Rx, data = GVHDdata),lty=c(1,2),lwd=2)



Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle

More information about the R-help mailing list