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

📄 outputfigure.m

📁 离散算法
💻 M
字号:
function outputFigure(t,pop,  n,t_pop,t_evals, in_Bounds);
% % % div = 10;
% % % xMin = 00;
% % % xLen = 1000;
% % % xMax = xMin + xLen;
% % % xStep = xLen / div;
% % % yMin = 000;
% % % yLen = 1000;
% % % yMax = yMin + yLen;
% % % yStep = yLen / div;
% div = 10;
xMin = in_Bounds(1, 1);
xMax = in_Bounds(1, 2);
xLen = xMax - xMin;
xStep = in_Bounds(1, 3);

yMin = in_Bounds(2, 1);
yMax = in_Bounds(2, 2);
yLen = yMax - yMin;
yStep = in_Bounds(2, 3);

figure(t),clf reset,h_ap=axes('Position',[0.08, 0.09, 0.85, 0.85]);
% 坐标刻度显示
set(h_ap,'Xlim',[xMin, xMax],'Ylim',[yMin, yMax]);
pxtick = xMin: xStep: xMax;
pytick = yMin: yStep: yMax;
set(h_ap,'Xtick',pxtick,'Ytick',pytick);
hold on
% 坐标轴显示
xlabel('\fontsize{12}\fontname{隶书}f1','Position',[xMin+1.05 * xLen, yMin+0.02 * yLen, 1 * xLen]);
text(xMax, yMin+ 0.005*yLen,'\fontsize{12}\fontname{Arial Black}\bf\rightarrow'); % +0.975 * xLen       
ylabel('\fontsize{12}\fontname{隶书}f2','Position',[xMin-0.000 * xLen, yMin+1.025 * yLen, 1 * yLen],'Rotation',0); % 
text(xMin- 0.005*xLen , yMax- 0.01*yLen,'\fontsize{12}\fontname{Arial Black}\bf\rightarrow','Rotation',90);%         + 0.96 * yLen
% 种群显示
p=size(pop,1);
for i=1:p
    plot(pop(i,n+1),pop(i,n+2),'r+');
end

% 设标题
popStr=strcat('pop=',num2str(t_pop));
evalsStr=strcat('evaluations=',num2str(t_evals));
titleStr=['Flowshop',' (', popStr, ' ', evalsStr,')']; %\fontsize{16}\fontname{Arial Black}\bf
title(titleStr);
% 设显示代数和迭代次数
% if nargin==6
    plot(xLen * 0.7 + xMin, yLen * 0.95 + yMin, 'bs');
    text(xLen * 0.72 + xMin, yLen * 0.95 + yMin, 'Pareto Optimal');
    plot(xLen * 0.7 + xMin, yLen * 0.9 + yMin, 'r+');   
    if (t_evals > 0)
        text(xLen * 0.72 + xMin, yLen * 0.9 + yMin, 'Solutions in this Paper');
    elseif (t_evals == 0)
        text(xLen * 0.72 + xMin, yLen * 0.9 + yMin, 'Initial Solutions');
    else (t_evals < 0)
        text(xLen * 0.72 + xMin, yLen * 0.9 + yMin, 'All Solutions');
    end
% end
drawnow

⌨️ 快捷键说明

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