这是我的例子

library(survival)
fit <- survfit(Surv(time, status) ~ sex, data = lung)
plot(fit, col=c("orange","purple"), lty=c(1:2), lwd=3, # base with some customization
     conf.int = TRUE, xmax = 2000)
# add a legend
legend(100, .2, c("Ovarian Cancer", "Breast Cancer"), 
       lty = c(1:2), col=c("orange","purple"))

这是情节的样子:
survival plot with legend

我也试过了

legend('bottomleft', c("Ovarian Cancer", "Breast Cancer"), 
       lty = c(1:2), col=c("orange","purple"))

传说只看起来略胜一筹

有人知道如何修复传奇吗?

Update 我在Win 7上,R是3.3.3