I would recommend not representing means by bars at all.
Bars are for counts, stacking from zero. Means are point estimates.
ggplot has a lot of routines for displaying means with errors bars:
geom_linerange, geom_pointrange. To hone your ggplot skills I
recommend looking into these geoms.
Like this?
# example using qplot
library(ggplot2)
meanprice - tapply(diamonds$price, diamonds$cut, mean);meanprice
cut - factor(levels(diamonds$cut), levels = levels(diamonds$cut))
qplot(cut, meanprice, geom=bar, stat=identity, fill = I(grey50))
dev.new() # create a new graph to compare with
2 matches
Mail list logo