MATLAB绘图脚本片段

xiaoxiao2021-02-28  75

clear all; Radius = 50; lujing = 'K:\数据备份\liujiankai\I盘备份\数据\计算均匀介质板模型数据\反除法\zhijieqiujie\改变放电参数\data\1000000000N0\'; PN0 = [0 6.66 66.6]; co = 2; for iter = 1:1:size(PN0,2) lujing1 = [lujing,num2str(PN0(iter)),'Pa\40700000MHz\']; load([lujing1,'EZ.mat']); varname= (['EZ',num2str(iter)]); eval( [varname, '= EZ;'] ); end for iter = 1:1:size(PN0,2) if iter ==1 str1 = [num2str(PN0(iter)),'Pa']; else str2 = [num2str(PN0(iter)),'Pa']; str1 = strvcat(str1,str2); end end XX = 0:Radius./(size(EZ1,2)-1):50; figure(1) for iter = 1:1:size(PN0,2) eval(['plot(XX,EZ',num2str(iter),'(1,:));']); hold on; end ylabel('|E_{z}|(V/cm)'); xlabel('R(cm)'); legend(str1); set(gcf,'Position',[100 100 260 220].*co); %[x位置 y位置 x大小 y大小] set(gca,'Position',[.15 .17 .80 .74]); %调整 XLABLE和YLABLE不会被切掉 figure_FontSize=8.*co; %字体大小 set(get(gca,'XLabel'),'FontSize',figure_FontSize,'Vertical','top'); set(get(gca,'YLabel'),'FontSize',figure_FontSize,'Vertical','bottom'); set(gca,'linewidth',1.5) %图框线粗 set(findobj('FontSize',10),'FontSize',figure_FontSize); %刻度值字体大小 set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',2); %线粗
转载请注明原文地址: https://www.6miu.com/read-54463.html

最新回复(0)