[R] problem with the legend when having two plots
kayj
kjaja27 at yahoo.com
Thu Jun 11 15:23:49 CEST 2009
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.
More information about the R-help
mailing list