Skip to content

Conditional error bars

2 messages · raz, William Dunlap

#
Change your two lines
to the one line
       arrows(xvals, mean, xvals, mean + sign(mean) * se, angle=90, length=length)

(I would also use a scatter plot instead of a barplot for this sort of thing and
draw both error bars.  I think the bars give a misleading impression of what
is going on.)

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com