直方图

Posted airboy1

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了直方图相关的知识,希望对你有一定的参考价值。

%% bar bar3 竖直  bar(  ,‘style‘)  group 默认,stack 堆叠

Income=[0.5,0.7,0.8;0.7,0.8,0.4;0.4,0.3,0.9;0.3,0.6,0.9;0.2,0.1,0.6];
subplot(221)
bar(Income,‘group‘);title(‘group‘)
subplot(222)
bar(Income,‘stack‘);title(‘stack‘)   %第二个的高度=第一个数+第二个数
subplot(223)
barh(Income,‘stack‘);title(‘stack‘)
subplot(224)
bar(Income,1);title(‘Width=1‘)  % 比较第一张图,width=1时,条形之间没有间距

  技术分享图片

以上是关于直方图的主要内容,如果未能解决你的问题,请参考以下文章