Re: [R] main title x title and y title with ggplot2

2008-03-05 Thread h . wickham
> I had the same problem and found a solution in some forums. Try this: > > p<-ggplot(data, aes(x,y,fill)) + geom_point() + scale_x_continuous("your > xlabel") + scale_y_continuous("your ylabel") The new (more ggplot-like way) is to do: ggplot(data, aes(x,y,fill)) + ... + opts(title = "my title")

Re: [R] Custom Plot - means, SD & 5th-95th% (Plotmeans or Boxplot)

2008-02-17 Thread h . wickham
It's fairly simple to set up something like this for ggplot2: install.packages("ggplot2") library(ggplot2) library(ggplot2) q5 <- function(data) { q <- function(p) unname(quantile(data$y, p)) data.frame(min = q(0.05), max = q(0.95)) } ggplot(diamonds, aes(x = cut, y = price)) + stat_summary(f