
%% Setup figures
close all;
set(0,'DefaultAxesLineWidth',0.75);
set(0,'DefaultLineLineWidth',1.1);
set(0,'DefaultAxesFontSize',12);

%% Generate a results filename
vert = pairs_conv(2);
rfilename = sprintf('accuracy-results-%s-katz-%s-%i',graphname,katz_alpha_name,vert);

%% Load the data we just saved
load(rfilename);

%% Plot the convergence in the ordering

%setup_plot;

clf; hold on;
allktau = [results(1:length(results)).ktauk];
alloverlap = [results(1:length(results)).overlapk];

xs = [results(1:length(results)).nedges]/nnz(A);
legtexts = {};
hs=[];
styles = {'.-','.--','.-.','.:'};

hs(end+1) = semilogx([cgresults.nedges]/nnz(A),[cgresults.ktauk],'ko-');
legtexts{end+1} = 'cg k=25 ';
% print k=25
ki=2;
hs(end+1) = semilogx(xs,allktau(ki,:),styles{ki},'MarkerSize',14,'Color','r');
legtexts{end+1} = sprintf('k=%i ',ks(ki));
title(sprintf('%s, Katz, %s alpha',graphname,katz_alpha_name));

ylim([-0.1,1.1]);
xlim([1e-3,1e3]);
set(gca,'XTick',[1e-2,1e-1,1,10,100]);
lh = legend(hs,legtexts{:},'Location','SE');
legend boxoff;
set(gca,'XScale','log');
xlabel('Work in equivalent matrix-vector products');
ylabel('Kendtall-\tau ordering vs. exact');

%%
box on;
greygrid;
transfigure;
set_figure_size([1.5 2]);
print(gcf,sprintf('katz-career-%s.eps',graphname),'-depsc2');

