[R] ggplot2: geom_errorbarh()
Benoit Boulinguiez
benoit.boulinguiez at ensc-rennes.fr
Wed Jul 15 12:36:10 CEST 2009
Hi,
I expect 'width' to set the width of the horizontal line of the whisker, as
it does with errobar()
Regards/Cordialement
Benoit Boulinguiez
-----Message d'origine-----
De : hadley wickham [mailto:h.wickham at gmail.com]
Envoyé : dimanche 12 juillet 2009 11:04
À : Benoit Boulinguiez
Cc : r-help at r-project.org
Objet : Re: [R] ggplot2: geom_errorbarh()
Hi Benoit,
What do you expect width to do? You are already setting the left and right
extents with xmin and xmax.
Hadley
On Thu, Jul 9, 2009 at 10:37 AM, Benoit
Boulinguiez<benoit.boulinguiez at ensc-rennes.fr> wrote:
> Hi all,
>
> quick question: is the optional command "width" effective in the
> geom_errorbarh() layer of ggplot?
> Cause I can't get it works on this graph
> http://www.4shared.com/file/116919103/93488d88/iso_2PrsH.html
>
>
> pdf(file = "iso_2PrsH.pdf", width = 7, height = 7)
> NC60.iso.graph<-ggplot(
> NC60.DATA
> ,aes(Ce,Qe)) +
> geom_point(col=MaCouleur1, size=4) +
>
> geom_errorbar(
> aes(ymax = NC60.DATA$Qe+NC60.DATA$sdQe
> ,ymin=NC60.DATA$Qe-NC60.DATA$sdQe)
> ,colour=alpha("black",0.4)
> ,width=1) +
>
> geom_errorbarh(
> aes(xmax = NC60.DATA$Ce+NC60.DATA$sdCe
> ,xmin=NC60.DATA$Ce-NC60.DATA$sdCe)
> ,colour=alpha("black",0.4)
> ,width=1) +
>
> geom_line(data=NC60.Res4.curve
> ,aes(x,y)
> ,size=1
> ,colour=alpha("black",0.5)) +
> xlab(C[e]~(mmol/m^3)) +
> ylab(q[e]~(mmol/m^3))
>
> print(NC60.iso.graph)
> dev.off()
>
> Regards/Cordialement
>
> -------------
> Benoit Boulinguiez
> Ph.D student
> Ecole de Chimie de Rennes (ENSCR) Bureau 1.20 Equipe CIP UMR CNRS 6226
> "Sciences Chimiques de Rennes"
> Avenue du Général Leclerc
> CS 50837
> 35708 Rennes CEDEX 7
> Tel 33 (0)2 23 23 80 83
> Fax 33 (0)2 23 23 81 20
> <http://www.ensc-rennes.fr/> http://www.ensc-rennes.fr/
>
>
>
> [[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.
>
>
--
http://had.co.nz/
More information about the R-help
mailing list