[R] geom_errorbar with ggplot2

hadley wickham h.wickham at gmail.com
Sat Oct 13 18:57:04 CEST 2007

Hi Pedro,

That's a bug in the current version of ggplot.  I'll try to get a new
version on CRAN soon, but if you let me know what platform you're on,
I can send you a fixed version right away.


On 10/13/07, Pedro de Barros <pbarros at ualg.pt> wrote:
> Dear All,
> I am trying to build an error bar plot with ggplot2. However, even if
> the code seems to work, the plot is rather odd, with what seems to be
> a continuous line linking the different bars.
> I attach below the code I used, as well as the data.
> ================================================================
> DFrame<-data.frame(x=1:10,y=0.5*(1:10),Upper=(1:10)+0.5, Lower=(1:10)-0.5)
> p <- ggplot()
> l1<-layer(data=DFrame, mapping=aes_string(x='x',min='Lower',
> max='Upper'), geom='errorbar', stat='identity')
> p<-p + l1 + scale_y_continuous()
> p
> ========================================
> I wonder if anyone can help me with this.
> Best,
> Pedro de Barros
> ______________________________________________
> 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.


More information about the R-help mailing list