当前位置:网站首页>Matlab画图2
Matlab画图2
2022-08-04 20:31:00 【万年老竹】
Matlab画图 2 统计类图像
图像类型

1.直方图 histogram
适用情况:统计整体的分布情况
histogram(X)
//histogram 函数自动选择合适的 bin 的数量,以便涵盖 x 中的值范围并显示基本分布的形状。
histogram(X,nbins)
//使用标量 nbins 指定的 bin 数量。
histogram(X,edges)
//将 X 划分到由向量 edges 来指定 bin 边界的 bin 内。每个 bin 都包含左边界,但不包含右边界,除了同时包含两个边界的最后一个 bin 外。
eg:
y=randn(1,1000);
subplot(2,1,1);histogram(y);title('Bins=default');
subplot(2,1,2);histogram(y,50);title('Bins=50');
结果如下

2.直方图 Bar Chart
适用情况:个体之间不同的分布情况 eg:
x=[1 2 5 4 8];y=[x;1:5];
subplot(1,3,1);bar(x);title('bar of x');
subplot(1,3,2);bar(y);title('bar of y');
subplot(1,3,3);bar3(y);title('bar of y 3D');
结果如下

3.堆叠和水平条形图 Stacked and Horizontal Bar Chart
eg:
x=[1 2 5 4 8];y=[x;1:5];
subplot(1,3,1);bar(x,'stacked');title('bar of x in stacked');
subplot(1,3,2);bar(y,'stacked');title('bar of y in stacked');
subplot(1,3,3);barh(y);title('bar of y in horizontal');
结果如下

4.饼状图 Pie Chart
eg:
x=[1 2 5 6];
subplot(2,2,1);pie(x);
subplot(2,2,2);pie(x,[0,0,0,1]);
subplot(2,2,3);pie3(x);
subplot(2,2,4);pie3(x,[0,0,0,1]);
结果如下

5.极坐标图 Polar Chart
6.阶梯图与针状图 Stair and Stem Chart
7.箱线图与误差条线图 Boxplot and Error Bar
8.
边栏推荐
猜你喜欢

帝国CMS仿核弹头H5小游戏模板/92game帝国CMS内核仿游戏网整站源码

AWS SES 的监控和告警

Qt Designer生成的图形可以自适应窗口的大小变化

linkboy 5.0 正式发布,新增语音识别、图像识别

Comic | Two weeks after the boss laid me off, he hired me back and doubled my salary!

JS new一个构造器发生了什么?从零手写一个new方法

刷题-洛谷-P1200 你的飞碟在这儿Your Ride Is Here

微信小程序云开发 | 赠、删、改城市名称信息的应用实现
Force KouTi (5), the longest text string back

基于HDF的LED驱动程序开发(2)
随机推荐
如何找到某个 ABAP structure 某字段的源头来自哪个数据库表
vim clear last search highlighting
从卖产品到卖“链路”:20条策略 解读直播带货迭代玩法
C#的Dictionary字典集合按照key键进行升序和降序排列
Qt Designer生成的图形可以自适应窗口的大小变化
手撕SparkSQL五大JOIN的底层机制
ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators
MySQL字段类型
How to make good use of builder mode
linkboy 5.0 正式发布,新增语音识别、图像识别
win10 uwp modify picture quality compress picture
"WAIC 2022 · hackers marathon" two ants wealth competition invited you to fight!
多商户商城系统功能拆解22讲-平台端分销商品
Elastic Search 根据匹配分和热度分排序
实现菜单拖拽排序
QT(41)-多线程-QTThread-同步QSemaphore-互斥QMutex
大资本已开始逃离加密领域?
搭建MyCat2双主双从的MySQL读写分离
刷题-洛谷-P1317 低洼地
Force KouTi (5), the longest text string back