function plotgraphics(filename)

eval(filename);

whos

xmin=100; xmax=-1;

[buff,I]=sort(droptolILUC);
droptolILUC  =droptolILUC(I);
memILUC      =memILUC(I);
timeiluILUC  =timeiluILUC(I);
totaltimeILUC=totaltimeILUC(I);
successILUC=find(~isnan(totaltimeILUC));
if ~isempty(successILUC)
   successILUC=successILUC(find(totaltimeILUC(successILUC)~=inf));
end
% totaltimeILUC,totaltimeILUC(successILUC)
if ~isempty(successILUC)
   xmin=min(xmin,min(droptolILUC(successILUC)));
   xmax=max(xmax,max(droptolILUC(successILUC)));
end


[buff,I]=sort(droptolILUTP);
droptolILUTP  =droptolILUTP(I);
memILUTP      =memILUTP(I);
timeiluILUTP  =timeiluILUTP(I);
totaltimeILUTP=totaltimeILUTP(I);
successILUTP=find(~isnan(totaltimeILUTP));
if ~isempty(successILUTP)
   successILUTP=successILUTP(find(totaltimeILUTP(successILUTP)~=inf));
end
% totaltimeILUTP,totaltimeILUTP(successILUTP)
if ~isempty(successILUTP)
   xmin=min(xmin,min(droptolILUTP(successILUTP)));
   xmax=max(xmax,max(droptolILUTP(successILUTP)));
end

[buff,I]=sort(droptolILUPACK);
droptolILUPACK  =droptolILUPACK(I);
memILUPACK      =memILUPACK(I);
timeiluILUPACK  =timeiluILUPACK(I);
totaltimeILUPACK=totaltimeILUPACK(I);
successILUPACK=find(~isnan(totaltimeILUPACK));
if ~isempty(successILUPACK)
   successILUPACK=successILUPACK(find(totaltimeILUPACK(successILUPACK)~=inf));
end
% totaltimeILUPACK,totaltimeILUPACK(successILUPACK)
if ~isempty(successILUPACK)
   xmin=min(xmin,min(droptolILUPACK(successILUPACK)));
   xmax=max(xmax,max(droptolILUPACK(successILUPACK)));
end

[buff,I]=sort(droptolILUPACKS);
droptolILUPACKS  =droptolILUPACKS(I);
memILUPACKS      =memILUPACKS(I);
timeiluILUPACKS  =timeiluILUPACKS(I);
totaltimeILUPACKS=totaltimeILUPACKS(I);
successILUPACKS=find(~isnan(totaltimeILUPACKS));
if ~isempty(successILUPACKS)
   successILUPACKS=successILUPACKS(find(totaltimeILUPACKS(successILUPACKS)~=inf));
end
% totaltimeILUPACKS,totaltimeILUPACKS(successILUPACKS)
if ~isempty(successILUPACKS)
   xmin=min(xmin,min(droptolILUPACKS(successILUPACKS)));
   xmax=max(xmax,max(droptolILUPACKS(successILUPACKS)));
end

figure(1);clf
set(gca,'XDir', 'reverse');
set(gca,'FontSize', 16);
% set(gca,'FontWeight', 'bold');
set(gca,'LineWidth', 2);

figure(2);clf
set(gca,'XDir', 'reverse');
set(gca,'FontSize', 16);
% set(gca,'FontWeight', 'bold');
set(gca,'LineWidth', 2);

if ~isempty(successILUC)
   figure(1)
   semilogx(droptolILUC(successILUC),totaltimeILUC(successILUC),':xr','LineWidth',2,'MarkerSize',12);
   hold on;
   figure(2)
   semilogx(droptolILUC(successILUC),memILUC(successILUC),':xr','LineWidth',2,'MarkerSize',12);
   hold on;
end

if ~isempty(successILUTP)
   figure(1)
   semilogx(droptolILUTP(successILUTP),totaltimeILUTP(successILUTP),':*m','LineWidth',2,'MarkerSize',12);
   hold on;
   figure(2)
   semilogx(droptolILUTP(successILUTP),memILUTP(successILUTP),':*m','LineWidth',2,'MarkerSize',12);
   hold on;
end

if ~isempty(successILUPACK)
   figure(1)
   semilogx(droptolILUPACK(successILUPACK),totaltimeILUPACK(successILUPACK),':og','LineWidth',2,'MarkerSize',12);
   hold on;
   figure(2)
   semilogx(droptolILUPACK(successILUPACK),memILUPACK(successILUPACK),':og','LineWidth',2,'MarkerSize',12);
   hold on;
end

if ~isempty(successILUPACKS)
   figure(1)
   semilogx(droptolILUPACKS(successILUPACKS),totaltimeILUPACKS(successILUPACKS),':+g','LineWidth',2,'MarkerSize',12);
   figure(2)
   semilogx(droptolILUPACKS(successILUPACKS),memILUPACKS(successILUPACKS),':+g','LineWidth',2,'MarkerSize',12);
end


strg{1}=stringILUC;
strg{2}=stringILUTP;
strg{3}=stringILUPACK;
strg{4}=stringILUPACKS;

for i=1:2
    if     strcmp(strg{i}(1:9),'rcms/rcms')
       strg{i}=['RCM' strg{i}(10:end)];
    elseif strcmp(strg{i}(1:9),'mmds/mmds')
       strg{i}=['MMD' strg{i}(10:end)];
    elseif strcmp(strg{i}(1:9),'amfs/amfs')
       strg{i}=['AMF' strg{i}(10:end)];
    end

    if strcmp(strg{i}(4:8),',Norm')
       strg{i}=strg{i}(1:3);
    else
       strg{i}=[strg{i}(1:3) '+MC64'];
    end
    
end


for i=3:4
    strgbuff=[];
    % strgbuff=['\kappa=' num2str(eval(strg{i}(1:7))) ', '];
    % strg{i}
    if     strcmp(strg{i}(9:16),'rcms/PQs')
       strgbuff=[strgbuff 'RCM'];
    elseif strcmp(strg{i}(9:16),'mmds/PQs')
       strgbuff=[strgbuff 'MMD'];
    elseif strcmp(strg{i}(9:16),'amfs/PQs')
       strgbuff=[strgbuff 'AMF'];
    elseif strcmp(strg{i}(9:16),'PQs_/PQs')
       strgbuff=[strgbuff 'PQ'];
    elseif strcmp(strg{i}(9:16),'rcms/PPs')
       strgbuff=[strgbuff 'RCM'];
    elseif strcmp(strg{i}(9:16),'mmds/PPs')
       strgbuff=[strgbuff 'MMD'];
    elseif strcmp(strg{i}(9:16),'amfs/PPs')
       strgbuff=[strgbuff 'AMF'];
    elseif strcmp(strg{i}(9:16),'PPs_/PPs')
       strgbuff=[strgbuff 'PP'];
    end

    if ~strcmp(strg{i}(17:21),',Norm')
       strgbuff=[strgbuff  '+MC64'];
    end

    strg{i}=strgbuff;
end
strg{1}=['ILUC, ' strg{1}];
strg{2}=['ILUTP, ' strg{2}];
strg{3}=['ILUPACK-D, ' strg{3}];
strg{4}=['ILUPACK-S, ' strg{4}];


I=[];
if ~isempty(successILUC)
   I=[I, 1];
end
if ~isempty(successILUTP)
   I=[I, 2];
end
if ~isempty(successILUPACK)
   I=[I, 3];
end
if ~isempty(successILUPACKS)
   I=[I, 4];
end
strg=strg(I);
   

figure(1)
v=axis;
axis([xmin*0.8 xmax*1.2, v(3) v(4)*1.2])
set(gca,'XDir', 'reverse');
set(gca,'FontSize', 16);
% set(gca,'FontWeight', 'bold');
set(gca,'LineWidth', 2);
% set(gca,'MarkerSize', 6);
hold off;
legend(strg,2)


figure(2)
v=axis;
axis([xmin*0.8 xmax*1.2, v(3) v(4)*1.2])
set(gca,'XDir', 'reverse');
set(gca,'FontSize', 16);
% set(gca,'FontWeight', 'bold');
set(gca,'LineWidth', 2);
% set(gca,'MarkerSize', 6);
hold off;
% axis([xmin xmax ymin2 ymax2])
legend(strg,2)
