当前位置:网站首页>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.
边栏推荐
- Nuxt.js的优缺点和注意事项
- win10 uwp 修改图片质量压缩图片
- 面试官:JVM运行时数据区包含哪几部分?作用是啥?
- Using Baidu EasyDL to realize forest fire early warning and identification
- Desthiobiotin-PEG4-Azide_脱硫生物素-叠氮化物 100mg
- 使用 Chrome 开发者工具的 lighthouse 功能分析 web 应用的性能问题
- 如何用好建造者模式
- How to train a deep learning model?
- 泰山OFFICE技术讲座:底纹、高亮、边框的关系
- linkboy 5.0 正式发布,新增语音识别、图像识别
猜你喜欢
二叉树的遍历
2022年国内手机满意度榜单:华为稳坐国产品牌第一
零知识证明笔记——私密交易,pederson,区间证明,所有权证明
vscode离线安装插件方法
Chrome安装zotero connector 插件
After the tester with 10 years of service "naked resignation" from the big factory...
Five Minutes Introductory Text Processing Three Musketeers grep awk sed
LED的C语言应用程序
The book "The Essence of Alipay Experience Design", a record of knowledge related to testing
推荐系统_刘老师
随机推荐
Differences in the working mechanism between SAP E-commerce Cloud Accelerator and Spartacus UI
Using Baidu EasyDL to realize forest fire early warning and identification
Qt Designer生成的图形可以自适应窗口的大小变化
idea源码无法下载
搭建MyCat2一主一从的MySQL读写分离
web 应用开发最佳实践之一:避免大型、复杂的布局和布局抖动
搭建MyCat2双主双从的MySQL读写分离
vs Code runs a local web server
vs Code 运行一个本地WEB服务器
【数据挖掘】搜狐公司数据挖掘工程师笔试题
微信小程序云开发 | 赠、删、改城市名称信息的应用实现
Comic | Two weeks after the boss laid me off, he hired me back and doubled my salary!
[Awards for Essays] Autumn recruitment special training to create your exclusive product experience
简述@RequestParam与@RequestBody参数注解
泰山OFFICE技术讲座:底纹、高亮、边框的关系
The establishment of simple data cache layer
After encountering MapStruct, the conversion between PO, DTO and VO objects is no longer handwritten
uwp ScrollViewer content out of panel when set the long width
Uniapp微信雪糕刺客单页小程序源码
Nuxt.js的优缺点和注意事项