Dear Patrick, Try this: plot(y, xlab="Survival Time (Months)", ylab="Survival Probability", mark.time=TRUE, col = c("red", "blue"), main="Kaplan-Meier Curve of Survival Times - Stratified by Group", lwd=3) legend('topright',c("Locally Advanced", "Metastatic"),lty=1,col.text=c('red','blue'))
See ?legend for more information. HTH, Jorge On Tue, Nov 18, 2008 at 1:05 PM, Richardson, Patrick < [EMAIL PROTECTED]> wrote: > List, > > Is there any way to specify the position of the legend from within the > following code? If so, how can I do it. As it stands it in the bottom left > corner and I want to move it to the top right. I'm not sure if I can use > the default "plot" or if I need to go with the lattice package. Suggestions > much appreciated. > > plot(y, xlab="Survival Time (Months)", ylab="Survival Probability", > mark.time=TRUE, col = c("red", "blue"),legend.text = c("Locally Advanced", > "Metastatic"), > main="Kaplan-Meier Curve of Survival Times - Stratified by Group", lwd=3) > > > Thanks, > > _____________________________________________ > Patrick Richardson > Biostatistician - Program of Translational Medicine > Van Andel Research Institute - Webb Lab > 333 Bostwick Avenue NE > Grand Rapids, MI 49503 > ph. 616.234.5787 > > > This email message, including any attachments, is for ...{{dropped:13}} ______________________________________________ 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.