y=randn(1,10000);
subplot(2,1,1);
hist(y,10);
title('bins=10');
subplot(2,1,2);
hist(y,50);
title('bins=50');

x=[1 2 5 7 8];
y=[x;1:5];
subplot(1,2,1);
bar(y);
title('stacked');
subplot(1,2,2);
barh(y);
title('Horizontal');

a=[10 5 20 30];
subplot(1,3,1);pie(a)
subplot(1,3,2);pie(a,[0 0 0 1]);%[0 0 0 0]对4个数字占比是否分开1表示分开
subplot(1,3,3);pie3(a,[0 0 0 1]);

G=[46 38 29 24 13];
S=[29 27 17 26 8];
B=[29 23 19 32 7];
h=bar(1:5,[G' S' B']);
title('medle count ');
ylabel('Number of medals');
xlabel('Country');
legend('Gold','Silver','Bronze');
