翻译自 MATLAB 官方文档
x = 1900:10:2000;
y = [75 91 105 123.5 131 150 179 203 226 249 281.5];
bar(x,y)
load count.dat
Z = count(1:10,:);
figure
bar3(Z)
title('Detached Style')
bar3
没有 bar3(x,y,z)
的形式。如果需要,要自己写函数实现。x = randn(1000,1);
nbins = 25;
h = histogram(x,nbins)
x = randn(10000,1);
y = randn(10000,1);
h = histogram2(x,y)
xlabel('x')
ylabel('y')
theta = [0.1 1.1 5.4 3.4 2.3 4.5 3.2 3.4 5.6 2.3 2.1 3.5 0.6 6.1];
polarhistogram(theta,6)
帕累托图将向量 Y 中的值显示为降序排列的条形图。Y 中的值必须是非负的且不能包含 NaN。仅显示前 95% 的累积分布。
y = [90,75,30,60,5,40,40,5];
figure
pareto(y)
Y = [1, 5, 3;
3, 2, 7;
1, 5, 3;
2, 6, 1];
figure
area(Y)
X = categorical({'North','South','North','East','South','West'});
explode = {'North','South'};
pie(X,explode)
x = [1,3,0.5,2.5,2];
figure
pie3(x)