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: [mg4621] Re:bar charts with error bars?
  • From: dsmith at psy.ucsd.edu (David Smith)
  • Date: Wed, 21 Aug 1996 03:25:37 -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?
> 
>The idea provided by David of combining BarChart with
>ErrorListPlot works fine for a single row of bars (thanks David!)
>Anyone have any suggestions on what to do
>for grouped bar charts, such as what you get with 
>
>BarChart[{1,2,2,3},{2,3,3.5,4},
>      BarLabels->{"Monday","Tuesday","Wednesday","Thursday"}]
>
>It's not clear how to use ErrorListPlot here, since there
>are multiple bars for each x value.

Hi, You should be able to use BarChart and ErrorListPlot in the
same way as before except you would need to use non-integer values
along the x-axis. Something like ...

ErrorListPlot[{{1,1,0.3},{1.4,2,0.5},...}}]

where the 0.4 offset of the second x-value from the first x-value
should place the error bar in the right place. Just do the same for
the second set, i.e. {2,?,?},{2.4,?,?} and so on.

David Smith
dsmith at psy.ucsd.edu
Dept of Psychology
Univ. California, San Diego

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


  • Prev by Date: Re: Printing Landscape
  • Next by Date: Re: List of x,y pairs to use with ListPlot
  • Previous by thread: Re: bar charts with error bars?
  • Next by thread: Re: partial diferential ecuations