Function: BarChart - produce a bar chart from data

Calling sequence:

BarChart(L, options);


L - a list, list of lists, or one- or two-dimensional array or Array

options - many of the usual two-dimensional plot options, plus stacked , horizontal , percent , and barlabels = B , where B is a list.



A simple bar chart.

> BarChart([3,1,4,1,5]);

[Maple Plot]

The same data, but using horizontal bars, specified colours and labels.

> BarChart([3,1,4,1,5],horizontal,colour=[red,yellow,green,blue,magenta],barlabels=["A","B","C","D","E"]);

[Maple Plot]

Bar chart with groups, using the percent option. Note that the groups can be of different sizes. The style=line option causes the bars to be shown in outline only.

> BarChart([[1,2,3,4],[4,5,6],[7,8]],percent,barlabels=[First,Second,Third],percent,colour=[red,green,blue],thickness=2,style=line);

[Maple Plot]

The same data in a stacked bar chart.

> BarChart([[1,2,3,4],[4,5,6],[7,8]],percent,barlabels=[First,Second,Third],percent,stacked,colour=[red,green,blue]);

[Maple Plot]


See also: plot[options] , PieChart

Maple Advisor Database R. Israel, 2000