[R] Plotting error bars in xy-direction

Ben Bolker bolker at ufl.edu
Wed Dec 5 16:54:16 CET 2007




Hans W Borchers wrote:
> 
> Dear R-help,
> 
> I am looking for a function that will plot error bars in x- or y-direction
> (or 
> both), the same as the Gnuplot function 'plot' can achieve with:
> 
>     plot "file.dat" with xyerrorbars,...
> 
> Rsite-searching led me to the functions 'errbar' and 'plotCI' in the
> Hmisc, 
> gregmisc, and plotrix packages. As I understand the descriptions and
> examples, 
> none of these functions provides horizontal error bars.
> 
> Looking into 'errbar' and using segments, I wrote a small function for
> myself 
> adding these kinds of error bars to existing plots. I would still be
> interested 
> to know what the standard R solution is.
> 
> Regards,  Hans Werner
> 
> 

plotCI from plotrix will do horizontal error bars --
from ?plotCI:

  err: The direction of error bars: "x" for horizontal, "y" for
          vertical ("xy" would be nice but is not implemented yet;
          don't know quite how everything would be specified.  See
          examples for composing a plot with simultaneous horizontal
          and vertical error bars)

  Ben Bolker

  
-- 
View this message in context: http://www.nabble.com/Plotting-error-bars-in-xy-direction-tf4948535.html#a14174151
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list