pie
Pie chart
句法
派(x)
派(x,爆炸)
派(x,标签)
派(x,爆炸,标签)
馅饼(斧头,___)
p = pie(___)
Description
馅饼(
draws a pie chart using the data inX
)X
。饼图的每个切片代表X
。
如果
sum(x)≤1
, 然后the values inX
directly specify the areas of the pie slices.pie
draws only a partial pie ifsum(X) < 1
。如果
sum(X) > 1
, 然后pie
通过x/sum(x)
to determine the area of each slice of the pie.如果
X
是数据类型categorical
,,,,the slices correspond to categories. The area of each slice is the number of elements in the category divided by the number of elements inX
。
例子
输入参数
输出参数
扩展功能
Introduced before R2006a
Was this topic helpful?