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

John Sorkin jsorkin at grecc.umaryland.edu
Thu May 7 14:00:59 CEST 2009

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)


John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
Baltimore VA Medical Center GRECC,
University of Maryland School of Medicine Claude D. Pepper OAIC,
University of Maryland Clinical Nutrition Research Unit, and
Baltimore VA Center Stroke of Excellence

University of Maryland School of Medicine
Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
Baltimore, MD 21201-1524

(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)
jsorkin at grecc.umaryland.edu
Confidentiality Statement:
This email message, including any attachments, is for th...{{dropped:6}}

More information about the R-help mailing list