Hi Maria, Instead of using errbar(), you can use the segments command which may be more flexible. Following the example on p.80 (the errbar command) of http://cran.ma.ic.ac.uk/web/packages/Hmisc/Hmisc.pdf
set.seed(1) x=1:10 y=x+rnorm(10) delta=runif(10) barwidth=0.015 x11();plot(x,y) segments(x,y-delta,x,y+delta) segments(x-barwidth,y+delta,x+barwidth,y+delta) segments(x-barwidth,y-delta,x+barwidth,y-delta) Best, Toby ________________________________________ From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of Gerrit Eichner [gerrit.eich...@math.uni-giessen.de] Sent: 09 February 2011 07:45 To: Lathouri, Maria Cc: r-help@r-project.org Subject: Re: [R] add error bars in a plot Hello, Maria, take a look at ?errbar in the package Hmisc. Hth -- Gerrit > Dear all > > I have a dataset of how metal concentrations change through time. I have > made a plot of date versus metal concentration. However I want to add > error bars in the plot. > > Could you help me? > > Thanks > Maria ______________________________________________ R-help@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. ______________________________________________ R-help@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.