[R] Generating plots with two lines, each line plotted with a different color
zvrba at ifi.uio.no
Thu May 7 14:06:58 CEST 2009
On Thu, May 07, 2009 at 08:00:59AM -0400, John Sorkin wrote:
> 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)
Try adding col=c("red","blue") as additional parameter.
More information about the R-help