当前位置:网站首页>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.
边栏推荐
猜你喜欢

【学术相关】清华教授发文劝退读博:我见过太多博士生精神崩溃、心态失衡、身体垮掉、一事无成!...

C#移动OA办公系统源码(基于微信企业号)

从卖产品到卖“链路”:20条策略 解读直播带货迭代玩法

Tensorflow2 环境搭建

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

hash和history路由的区别

搭建MyCat2一主一从的MySQL读写分离
![[Academic related] Tsinghua professor persuaded to quit his Ph.D.:I have seen too many doctoral students have mental breakdowns, mental imbalances, physical collapses, and nothing!...](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[Academic related] Tsinghua professor persuaded to quit his Ph.D.:I have seen too many doctoral students have mental breakdowns, mental imbalances, physical collapses, and nothing!...

win10终端中如何切换磁盘

刷题-洛谷-P1179 数字统计
随机推荐
Using Baidu EasyDL to realize forest fire early warning and identification
ts集成和使用
Finished product upgrade program
Elastic Search 根据匹配分和热度分排序
Red5搭建直播平台
LED的C语言应用程序
37.轮播图
Desthiobiotin衍生物Desthiobiotin-PEG4-Amine/Alkyne/Azide/DBCO
[Awards for Essays] Autumn recruitment special training to create your exclusive product experience
About the state transfer problem of SAP e-commerce cloud Spartacus UI SSR
【数据挖掘】搜狐公司数据挖掘工程师笔试题
刷题-洛谷-P1304 哥德巴赫猜想
多商户商城系统功能拆解22讲-平台端分销商品
简述@RequestParam与@RequestBody参数注解
零知识证明——zkSNARK证明体系
【SQL】触发器同步表数据
遇到MapStruct后,再也不手写PO,DTO,VO对象之间的转换了
composition-api
Web3安全风险令人生畏,应该如何应对?
JS new一个构造器发生了什么?从零手写一个new方法