此函數創建一個餅圖。此函數確定與 x 的每個值相對應的總餅圖的百分比,並繪製該大小的餅圖切片。
可選數組爆炸控製單個餅圖切片是否與餅圖的其餘部分分開。
用法
pie(x) // It draws a pie chart with the data in x.
pie(x, explode) // It offsets a slice from the pie.explode is a vector or matrix of zeroes and non-zeroes corresponding to x.
示例
World population by continents.
cont= char('Asia','Europe','Africa',....'N.America','S.America');
pop=[3332;696;694;437;307];
pie(pop)
for i=1:5,
gtext (cont(i,:));
end
Title ('World Population (1992)',....'fontsize', 18)
輸出:

相關用法
- MATLAB meshz()用法及代碼示例
- MATLAB contour()用法及代碼示例
- MATLAB loglog()用法及代碼示例
- MATLAB ribbon()用法及代碼示例
- MATLAB comet()用法及代碼示例
- MATLAB Stairs()用法及代碼示例
- MATLAB pcolor()用法及代碼示例
- MATLAB Bar()用法及代碼示例
- MATLAB contour3()用法及代碼示例
- MATLAB barh()用法及代碼示例
- MATLAB area()用法及代碼示例
- MATLAB stem3()用法及代碼示例
- MATLAB waterfall()用法及代碼示例
- MATLAB quiver()用法及代碼示例
- MATLAB slice()用法及代碼示例
- MATLAB Semilogy()用法及代碼示例
- MATLAB plotyy()用法及代碼示例
- MATLAB fill3()用法及代碼示例
- MATLAB fill()用法及代碼示例
- MATLAB cylinder()用法及代碼示例
注:本文由純淨天空篩選整理自 MATLAB Pie()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。