matlab基础——LinePlots and Subplots
来源:互联网 发布:和平电视直播软件 编辑:程序博客网 时间:2024/06/15 22:24
%%%%%Line Plots%%%%%%%To creat two-dimensional line plots,use the plot functionx=linspace(0,2*pi);%To generate linearly spaced vector,use the linspace functiony=sin(x);z=cos(x);figureplot(x,y);xlabel('x');%label the axesylabel('y');title('y=sin(x)');%add a titlefigureplot(x,z,'r-s');%plot(X,Y,LineSpec) sets the line style, marker symbol, and color %如此处设置线条为红色(r)实线(-)方块(s),详见matlab帮助文档figureplot(x,y,x,z);legend('sin','cos');%Add legend to graph%%%%%Subplots%%%%%%%display multiple plots in different subregions of the same window using the subplot function %the first two inputs to subplot indicate the number of plots in each row and column%the third input specifies which plot is activefiguresubplot(2,2,1);plot(x,y);xlabel('x');ylabel('y');title('one');subplot(2,2,2);plot(x,z,'r--');xlabel('x');ylabel('y');title('two');subplot(2,2,3);plot(x,y,x,z);xlabel('x');title('three');
运行结果:
阅读全文
1 0
- matlab基础——LinePlots and Subplots
- Matlab Tricks(二十四)—— title 置于图像之下(包括 subplots 的情形)
- matlab基础——Matrices and Arrays
- matlab基础——Text and Characters
- MATLAB学习笔记——matlab基础
- MATLAB程序设计教程(1)——MATLAB操作基础
- 【Matlab学习随笔系列1——Matlab计算基础】
- matlab基础学习——数值计算
- matlab基础学习——数组
- matlab 基础 —— 文本文件读取
- matlab 基础 —— 输出相关信息
- Matlab学习笔记1——基础
- Matlab基础——变量和语句
- MATLAB基础学习(一)——计算基础
- Matlab实现——Jacobi Iteration and Gauss-Seidel Iteration
- matplotlib subplots 调整子图间矩
- matplotlib.pyplot.subplots
- 【.NET基础】——ShadowCopy And DeepCopy
- TensorFlow笔记:数据导出
- 正则表达式知识
- QTCpSocket文件传输
- iscsi磁盘共享
- Comparator 升序降序
- matlab基础——LinePlots and Subplots
- IT的道德与伦理
- MySQL的auto_increment功能
- leetcode题解-25. Reverse Nodes in k-Group
- 用HTML前端技术做一个登入了界面+一些小技巧
- 测试工作---手动测试
- 工厂模式
- 设计模式C++实现(3)——装饰模式
- 成为Java顶尖程序员,先过了下面问题!