BarChart
Creates a bar chart.
Syntax
-
BarChart(data)
-
data
is a sequence of categories
-
Description
If data
is a sequence or list of objects of the form
"category name": value
then BarChart(data)
creates a bar chart with the categories given as data
.
The chart is shown in the current diagram and a reference to the chart is returned.
Examples
BarChart("Cats": 4, "Dogs": 7, "Rats": 5, "Rabbits": 4)
BarChart(sort(frequencies(compute(RandomInt(1000000)^2, n, 1, 1000000) @ digits @ first)))
Alice ≔ ExampleData("Alice in Wonderland"); BarChart(SortBy(frequencies(filter(characters(UpperCase(Alice)), ChrIsLetter)), (x ↦ −x[2])))