PieChart
Creates a pie chart.
Syntax
-
PieChart(data)-
datais a sequence of categories
-
Description
If data is a sequence or list of objects of the form
"category name": value
then PieChart(data) creates a pie chart with the categories given as data.
The chart is shown in the current diagram and a reference to the chart is returned.
Examples
PieChart("Cats": 4, "Dogs": 7, "Rats": 5, "Rabbits": 4)
Alice ≔ ExampleData("Alice in Wonderland");
πc ≔ PieChart(
'('("letters", ChrIsLetter),
'("punctuation", ChrIsPunctuation),
'("whitespace", ChrIsWhitespace)
)
@ (x ↦ '(x[1], count(Alice, x[2])))
);
AdjustVisual(πc, "label position": 20, "value labels": false);