⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 example_plotyy.asv

📁 基础程序
💻 ASV
字号:
% example_plotyy.m
% 使用plotyy函数绘制双坐标轴图像
x1=-2.9:0.2:2.9;
y1=exp(-x1.*x1);
x2=-2.9:0.02:2.9;
y2=sin(3*x2);
[AX,H1,H2] = plotyy(x1,y1,x2,y2,'bar','plot');
% 通过句柄函数改变属性
% 添加纵坐标轴名称
set(get(AX(1),'Ylabel'),'String','y1=exp(-x.*x)');
set(get(AX(2),'Ylabel'),'String','y2=sin(3*x)');

set(H1,'barwidth',0.6,'')
% 
% 
% 
% Use the xlabel and title commands to label the x-axis and add a title: 
% xlabel('Zero to 20 \musec.')
% title('Labeling plotyy')
% 
% 
% 
% Use the line handles to set the LineStyle properties of the left- and right-side plots: 
% set(H1,'LineStyle','--')
% set(H2,'LineStyle',':

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -