clear all
prep_figure
load('Rall.mat')
close all


figure
YY = arrayfun(@(x)x.fval,R,'UniformOutput',false);
COLOR = {'sel','nosel'};
[~,I] = sort(cellfun(@(x) min(x),YY(:,1)));
pos(I)=1:10;
g = gramm('y',YY(:,1)','x',1:101,'color',COLOR((pos<6)+1)')
g.geom_line();
g.set_names('x','iteration','y','objective function value','color','Cross')
g.axe_property('YScale','log','Ylim',[5e1,1e4])
g.no_legend()
g.draw;


makeFigure(0,0,2,150,100,'figure_optimization',true)