Hi All, Can anyone show me how to add a error bar to my graphs. I am currently using this code g<-ggplot(means,aes(x=variable,y=value))> g<-g+geom_bar(stat="identity")+facet_wrap(~Site+Season) > gThanks, Akaalz [[alternative HTML version deleted]]
Have you seen the examples at docs.ggplot2.org/0.9.3.1/geom_errorbar.html ? On Feb 18, 2014, at 10:57, "Alzahrani, Ahmad K A" <akaalz at essex.ac.uk> wrote:> Hi All, > > Can anyone show me how to add a error bar to my graphs. I am currently using this code > > g<-ggplot(means,aes(x=variable,y=value)) >> g<-g+geom_bar(stat="identity")+facet_wrap(~Site+Season) >> g > > Thanks, > > Akaalz > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Hi,
I perfectly agree that ggplot package is the perfect solution, but if
you prefer the old-fashion plot, you can find a plot_errorbar function
in the package phenology:
plot_errbar(1:100, rnorm(100, 1, 2),
xlab="axe x", ylab="axe y", bty="n",
xlim=c(1,100),
errbar.x=2, errbar.y=rnorm(100, 1, 0.1))
Marc Girondot
Le 18/02/2014 16:57, Alzahrani, Ahmad K A a ?crit :> Hi All,
>
> Can anyone show me how to add a error bar to my graphs. I am currently
using this code
>
> g<-ggplot(means,aes(x=variable,y=value))
>> g<-g+geom_bar(stat="identity")+facet_wrap(~Site+Season)
>> g
> Thanks,
>
> Akaalz
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>