MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: bar charts with error bars?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4426] Re: bar charts with error bars?
  • From: dsmith at psy.ucsd.edu (David Smith)
  • Date: Mon, 22 Jul 1996 00:49:31 -0400
  • Organization: Univ. of California, San Diego
  • Sender: owner-wri-mathgroup at wolfram.com

In article <4shut5$g7n at ralph.vnet.net>, mharm at gizmo.usc.edu (Mike Harm) wrote:

> I'm using the Graphics package to do some bar charts.  
> I've figured out how to do it, but how does one add
> error bars to the bars, to indicate statistical standard
> error?  Any insights?
> 

There's probably cleverer ways of doing this ... but why not do the
following? Example bar chart data of first three primes

p = BarChart[Table[Prime[n],{n,3}]]

then use the function

q = ErrorListPlot[{{1,2,0.3},{2,3,0.5},{3,5,1}}]

which generates a plot of data with {x,y,error} where you make sure 
that x and y are the tops of your bars in your bar chart. Then just
plot the two together

Show[p,q]

Maybe there is a way of combining ErrorListPlot with BarChart (if
anyone knows?)

David
dsmith at psy.ucsd.edu

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: Replacement
  • Next by Date: ErrorBars.m
  • Previous by thread: Re: Replacement
  • Next by thread: bar charts with error bars?