I draw a calibration plot with the R code from:http://rpubs.com/IL2/519772
require(rms)
library(Hmisc)
library(grid)
library(lattice)
library(Formula) 
library(ggplot2) 
library(survival)
library(survival)
data(lung)
lung$sex <- factor(lung$sex,levels = c(1,2),labels = c("male", "female"))
dd=datadist(lung)
options(datadist="dd") 
fit1<- lrm(status~ age + sex+ ph.karno,x=T,y=T, data = lung) 
cal1 <- calibrate(fit1,X=T,Y=T, method='boot',m=76,B=228)
plot(cal1,lwd=2,lty=1,
 cex.lab=1.2, cex.axis=1, cex.main=1.2, cex.sub=0.6,
 xlim = c(0,1),ylim= c(0,1),
 xlab="Nomogram-Predicted Probability of death risk",
 ylab="Actual death (proportion)",
 col=c("#00468BFF","#ED0000FF","#42B540FF")
 )
 lines(cal1[,c(1:3)], 
  type ="o", 
  lwd = 1, 
  pch = 16, 
  col=c("#00468BFF"))
abline(0,1,lty = 3, 
   lwd = 2, 
   col = c("#224444")
   ) 
However, my plot cannot show all the legend of "apparent, Bias-corrected, Ideal".
 How to edit the plot like the following?
How to edit the plot like the following?

 
    
