当前位置:网站首页>Matlab 画图(超详细)
Matlab 画图(超详细)
2022-07-27 05:13:00 【垫脚摸太阳】
Matlab 画图(超详细)
文章目录
一、散点图
1.最基础的散点图
x = linspace(-2, 2, 100);
y = x .^ 3;
scatter(x, y);

2.设置圆圈大小的散点图
x = linspace(-2, 2, 100);
y = x .^ 2;
sz = linspace(1, 100, 100);
scatter(x, y, sz);

二、折线图
1.一条线
x = 3:2:11;
y=[4,5,9,6,4];
plot(x, y);

2.多条线
x = 3:2:11;
y=[4,5,9,6,4;5,8,2,4,3];
plot(x, y);
三、柱状图(三种)
1.最基础的柱形图
x = 3:2:11;
y=[4,5,9,6,4];
bar(x, y);

2.多变量柱形图
x=3:5;
y=[4,5,9,6,4;5,7,9,8,7;1,3,5,9,7];
bar(x,y);

3.三维的柱形图
只需要把bar换成bar3即可。
x=3:5;
y=[4,5,9,6,4;5,7,9,8,7;1,3,5,9,7];
bar3(x,y);

四、火柴棍图(挺好看的)
clc;clear;
x =linspace(0,2*pi,60);
y = sin(x);
stem(x,y);

clc;clear;
x =linspace(0,2*pi,60);
y1 = sin(x);
y2 = cos(x);
stem(x,y1);
hold on
stem(x,y2);

五、饼状图
1.基本饼状图
y=[4,5,9,6,4];
pie(y);

2.三维饼状图
把pie该为pie3即可
y=[4,5,9,6,4];
pie3(y);

3.突出某一扇形的饼状图
X=[2,2,1,5,2];
explode = [0 1 0 0 0];
pie(X,explode);

六、面积图
x=3:8;
y=[45,6,8;7,4,7;6,25,4;7,5,8;9,9,4;2,6,8];
area(x,y);

七、雷达图
在另一篇博客上有详解,如下:
Matalb画雷达图(四行代码)

八、双坐标图
分别控制左右坐标就可以了,不要太简单。而且可以很多种图形任意搭配。
x= 1:3;
y= [9.0725,9.075,9.5175];
w= [229,230,207];
yyaxis left%控制左纵轴
bar(x,y);
yyaxis right%控制右纵轴
plot(x,w);

九、总结
目前就写这么多吧,还有哪些好图,评论留言告诉博主呀,以后会不断的更新,尽量总结出所有的图。
边栏推荐
- 1. Introduction to pytorch
- 身为技术管理者应该具备的素质(猜想)
- Day10. Work organization and mental health problems in PhD students
- 14. Example - Multi classification problem
- 17.动量与学习率的衰减
- Gbase 8C - SQL reference 6 SQL syntax (5)
- 18.卷积神经网络
- Day 4.Social Data Sentiment Analysis: Detection of Adolescent Depression Signals
- Performance optimization of common ADB commands
- Digital image processing Chapter 4 - frequency domain filtering
猜你喜欢

Day 7. Towards Preemptive Detection of Depression and Anxiety in Twitter

GBase 8c产品简介

18. Convolutional neural network

Deploy redis with docker for high availability master-slave replication

新冠时空分析——Global evidence of expressed sentiment alterations during the COVID-19 pandemic

14. Example - Multi classification problem

6.维度变换和Broadcasting

19. Up and down sampling and batchnorm

数字图像处理——第九章 形态学图像处理

4.张量数据类型和创建Tensor
随机推荐
Day 9. Graduate survey: A love–hurt relationship
12.优化问题实战
14.实例-多分类问题
Day10. Work organization and mental health problems in PhD students
ES对比两个索引的数据差
Day 11. Evidence for a mental health crisis in graduate education
11. Gradient derivation of perceptron
Numpy basic learning
2020年PHP中级面试知识点及答案
Day 7. Towards Preemptive Detection of Depression and Anxiety in Twitter
13. Logistic regression
【MVC架构】MVC模型
Gbase 8C - SQL reference 6 SQL syntax (7)
7.合并与分割
Day 2. Depressive symptoms, post-traumatic stress symptoms and suicide risk among graduate students
How to not overwrite the target source data when dBSwitch data migrates data increments
Rk3399 GPIO port how to find which GPIO port it is
Gbase 8C - SQL reference 6 SQL syntax (3)
php 定义数组使用逗号,
vscode打造golang开发环境以及golang的debug单元测试
