I am trying to plot survival curves and here is the code plot(survfit(Surv(days,status)~group, data=g3), lty=1:2, mark.time=F, ylab="Probability", xlab="Suvival Time in Month") legend(10, 0.2,legend=c("Control","RIT"), lty=c(2,1), title="Hormonal Therapy", bty="n")
I will get two survival plots with the Control on the top of the RIT but if I switch to legend=c(“RIT”,”Control”), I will have the same plots but now the top on is named as RIT and the bottom as Control! It does not seem that R can tell which graph corresponds to what, am I missing something. Thanks for the help -- View this message in context: http://www.nabble.com/problem-with-the-legend-when-having-two-plots-tp23981238p23981238.html Sent from the R help mailing list archive at Nabble.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.