search for: classiclimit

Displaying 1 result from an estimated 1 matches for "classiclimit".

Did you mean: classiclimits
2010 Apr 30
0
ggplot2 legend how?
...can anyone please show me how to setup and add a simple legend to a ggplot? This is my use case, I need a legend showing CI "Classic", "Own bootstrap", "R bootstrap": library(ggplot2) e <- 1 p <- 1 x <- 1:S y <- rep(betas[p],S) data <- data.frame(x,y) classiclimits <- aes(x=x,ymax = classic[,e,p,1], ymin=classic[,e,p,2]) ownlimits <- aes(x=x+0.4,ymax = own[,e,p,1], ymin=own[,e,p,2]) rbootlimits <- aes(x=x+0.8,ymax = rboot[,e,p,1], ymin=rboot[,e,p,2]) g1 <- ggplot(data, aes(x, y)) g1 + geom_errorbar(classiclimits, colour = "red") + g...