[R] ggplot2-barplot

Felipe Carrillo mazatlanmexico at yahoo.com
Mon Jun 23 22:05:43 CEST 2008


Thierry:
That's exactly what I wanted, Thanks

> Dear Felipe,
> 
> Is this what you want?
> 
> library(ggplot2)
> mydata <- data.frame(PondName = factor(LETTERS[1:5]),
> avgWt = rnorm(5,
> mean = 10, sd = 3))
> ggplot(mydata, aes(x = PondName, y = avgWt)) + geom_bar()
> ggplot(mydata, aes(x = PondName, y = avgWt, fill =
> PondName)) +
> geom_bar()
> 
> HTH,
> 
> Thierry



More information about the R-help mailing list