0000
0plot(t*1e+9,abs(iGG)/max(abs(iGG)),'k','linewidth',2);
0
00axis([-5,5,0,1])
xlabel('时间/ns');
00ylabel('幅度/a.u.');标题字体大小,字型
00set(get(gca,'title'),'FontSize',10,'FontName','宋体');%设置
00
set(get(gca,'XLabel'),'FontSize',10,'FontName','Times New Roman');%设置X坐标标题字体大小,字型Roman');%设置Y坐标标题字体大小,字型轴字体大小,字型
00set(get(gca,'YLabel'),'FontSize',10,'FontName','Times New
00set(gca,'FontName','Times New Roman','FontSize',10)%设置坐标
00text(0.3,1.2,'(a)','FontSize',10,'FontName','Times New Roman'); %设置文本字型字号标轴刻度数据点位置
00set(gca, 'XTick', [0 10 20 30 40 50 60 70 80 90]) %设置X坐
00
set(gca,'XTickLabel',{'0','10','20','30','40','50','60','70','80','90'}) %设置X坐标轴刻度处显示的字符数据点位置
00set(gca, 'YTick', [-15 -10 -5 0 5 10 15]) %设置X坐标轴刻度
00set(gca,'YTickLabel',{'-15','-10','-5','0','5','10','15'}) %设置Y坐标轴刻度处显示的字符axis([0,90,-20,20])轴的值;轴的值;
0000
set(gca,'YTickLabel',[]); %只显示y坐标轴刻度,不显示y坐标
00
00set(gca,'XTickLabel',[]); %只显示x坐标轴刻度,不显示x坐标
00set(gca,'ytick',[]); %y轴的坐标值和刻度均不显示;
00set(gca,'xtick',[]); %x轴的坐标值和刻度均不显示;
figure;
00set (gcf,'Position',[400,300,600,200]); %设定plot输出图片的尺寸。参数含义为:xmin,ymin,width,height
00%plot的默认参数为[232,246,560,420],Position的单位可以用units属性制定,units属性的值可以是下列字符串中的任何一
00
%种:pixel(像素,缺省值)、normalized(相对单位)、inches(英寸)、centimeters(厘米)、points(磅)。在WORD中显示的就是多大。
00%指定大小后,在figure中用text输出的文字大小,设置的是多大,
00
set (gcf,'units','centimeters','Position',[4,3,6,2]); %指定fiugre的尺寸为6cm宽,2cm高。%也可以直接用下属语句:
000000
00fiure('units','centimeters','Position',[4,3,6,2]);
%改变ylabel离坐标轴的距离
00hc=findobj(allchild(gcf), 'Type', 'axes');hc2=findobj(allchild(hc), 'Type', 'text');set(hc2(3), 'Position', [0 0 0]);%改变xlabel离坐标轴的距离
0000
00hc=findobj(allchild(gcf), 'Type', 'axes');hc2=findobj(allchild(hc), 'Type', 'text');set(hc2(4), 'Position', [0 0 0]);
%双y轴坐标图形调整
00000000
[AX,H1,H2]=plotyy(f*1e-12,abs(T1.*T1),f*1e-12,angle(T1.*T1)
);
00
set(AX,'FontSize',14,'FontName','Times New Roman')%设置x轴、左y轴、右y轴刻度字号和字型体为黑色;体为黑色;
00set(AX(1),'Xcolor','k','Ycolor','k')%设置x轴、左y轴刻度字
00set(AX(2),'Xcolor','k','Ycolor','k')%设置x轴、右y轴刻度字
00set(AX,'Xlim',[207.5 217.1],'xtick',[208:1:217])%设置x轴数据范围(207.5到217.1),刻度显示(208,209,210...217)
00
set(AX(1),'ylim',[0,0.5],'ytick',[0:0.1:0.5])%设置左y轴数据范围(0到0.5),刻度显示(0,0.1,0.2...0.5)(0到3),刻度显示(0,1,2,3)一条曲线的线型、颜色、粗细
00set(AX(2),'ylim',[0,3],'ytick',[0:1:3])%设置右y轴数据范围
00set(H1,'Linestyle','-','color','r','Linewidth',2.5);%设置第
00
line(x,y,'linestyle','-','color','r','Linewidth',2.5,'parent',AX(1));%在第一条曲线上再画一条曲线。第二条曲线的线型、颜色、粗细
00set(H2,'Linestyle','-.','color','b','Linewidth',2.5);%设置
00
set(get(AX(1),'Ylabel'),'string','Amplitude(a.u.)','FontSize',10,'FontName','Times New Roman','Position',[0 0 0 ]);%设置左y轴标题字号字型
00
set(get(AX(2),'Ylabel'),'string','Phase(rad)','FontSize',10,'FontName','Times New Roman');%设置右y轴标题字号字型
00
set(get(AX(1),'Xlabel'),'string','Optical
frequency(THz)','FontSize',10,'FontName','Times New Roman');%设置x坐标标题字体大小,字型
00
figure
00
00x = 0:0.01:20;
00y1 = 200*exp(-0.05*x).*sin(x);AX = plotyy(x,y1,x,y2,'plot');上画曲线。
%求极大值的位置:%求极小值的位置 %画椭圆x0=0;y0=0;a=2;b=4;
0000
y2 = 0.8*exp(-0.5*x).*sin(10*x);
0000line(x,.5*y1,'linestyle','--','parent',AX(1)) %在第一条曲线
00
00find(diff(sign(diff(data)))==-2)+1;
00
00find(diff(sign(diff(data)))==2)+1;
sita=0:pi/20:2*pi;
0000
0000
00fi=0;
00plot(x0+a*cos(sita+fi),y0+b*sin(sita+fi),'linewidth',1.5);%fi为方位角,x0,y0为中心点坐标,a/b为长短轴; %画箭头
0000
annotation('arrow',[0.535 0.62],[0.72
0.72],'LineStyle','-','Linewidth',1.5,'color',[0 0 1])%,'HeadStyle','cback3');figure的归一化坐标。
00
%箭头起始点(0.535,0.72),箭头结束点(0.62,0.72),坐标值为
00
0 0
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- awee.cn 版权所有 湘ICP备2023022495号-5
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务