Bar Chart

Author

Eric W. Weisstein
January 25, 2011

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Graphics/BarChart.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/BarChart.html.

©2010 Wolfram Research, Inc. except for portions noted otherwise

Example

V5

<<Graphics`Graphics`

bins=BinCounts[#,{0,10,1}]&/@{Table[10. Random[],{100}],Table[10. Random[],{100}]}

Show[GraphicsArray[{
BarChart[Sequence@@bins,DisplayFunction->Identity],
BarChart[Sequence@@bins,BarOrientation->Horizontal,
BarSpacing->-.3,BarGroupSpacing->.5,DisplayFunction->Identity],
StackedBarChart[Sequence@@bins,DisplayFunction->Identity]
}]]

V6

bins=Transpose[BinCounts[#,{0,10,1}]&/@RandomInteger[{0,10},{2,100}]]

bins={{4,11},{11,5},{4,13},{11,9},{12,12},{12,7},{6,8},{8,8},{13,14},{14,9}};

GraphicsRow[{
BarChart[bins,ChartStyle->{Red,Blue},BarSpacing->{0,.5},PerformanceGoal->"Speed"],
BarChart[bins,BarOrigin->Left,ChartStyle->{Red,Blue},PerformanceGoal->"Speed"],
BarChart[bins,ChartLayout->"Stacked",ChartStyle->{Red,Blue},BarSpacing->.5,PerformanceGoal->"Speed"]
}]