% cagingfig show different metrics close all; workpath = 'rlgcshape'; linewidth = 1.25; smoothflag = true; % set up figure % labels = {'(a)', '(b)'}; widthpix = 375; heightpix = 300; leftmargin = 80; bottommargin = 60; topmargin = 15; rightmargin = 10; centermargin = 90; widthtotal = widthpix*3+centermargin*2+leftmargin+rightmargin; heighttotal = heightpix+topmargin+bottommargin; left = leftmargin/widthtotal; bottom = bottommargin/heighttotal; center = centermargin/widthtotal; width = widthpix/widthtotal; height = heightpix/heighttotal; psize = 22; % font size msize = 9; % marker size fig = figure('rend','painters','pos',[100 100 widthtotal heighttotal]); colors = colororder(); phips = [1, 1.1276, 3.510, 6.248, 9.170, 12.22, 15.36, 18.6 ]; phid = 2.40339; deltad = 2.30672; %% panel (a) typical cage size nowpanel = axes('Position', [left, bottom, width, height]); dims = {'2D', '3D', '4D', '5D', '6D', '7D'}; for rp=1:length(dims) dim = dims{rp}; ndim = str2double(dim(1:end-1)); fname = strcat('../data/cagetypical_', dim, '.dat'); data = dlmread(fname, '', 1, 0); % filter out percolated phi and small phi percofilt = data(:,2)<1e-3 & data(:,1) > 1.35*ndim; xs = data(percofilt,1); ys = data(percofilt,4); plot(xs/ndim, ys*ndim, 'x-'); alldataB{rp} = [xs, ys]; if 1==rp, hold on, end end data = dlmread('../data/Deltamf.dat', ''); % mean field cage size dind = data(:,1)<2.315; dataMF = [data(dind,2), data(dind,1)]; plot(dataMF(:,1), dataMF(:,2), '--k', 'linewidth', 1.25); scatter(phid, deltad, 22, [0,0,0], 'filled'); text(3, 2, '$\hat\varphi_\mathrm{d}$', 'interpreter', 'latex', 'fontsize', psize); xlabel('$\hat\varphi$', 'interpreter', 'latex'); ylabel('$\hat{\Delta}_\mathrm{mode}$', 'interpreter', 'latex'); ylimrange = [1e-4,10]; xlim([0 40.5]); ylim(ylimrange); plot([phid,phid],ylimrange,'-k','color', [0.5,0.5,0.5]); xticks(0:10:40); yticks([1e-4, 1e-3, 1e-2, 1e-1, 1e0, 1e1]); set(gca, 'yscale', 'log'); h=legend([dims, '$\infty$D'], 'interpreter', 'latex', 'location', 'southwest', 'NumColumns', 2); %'$\infty$D' p=get(h, 'position'); p = p + [0.02, 0.02, 0, 0]; set(h, 'position', p, 'fontsize', psize-4); legend boxoff; set(nowpanel, 'fontname', 'times new roman', 'fontsize', psize); %% add inset insetax = axes('Position', [left+0.13, bottom+0.36, 0.13, 0.39]); for rp=1:length(dims) dim = dims{rp}; ndim = str2double(dim(1:end-1)); data = alldataB{rp}; xs = data(:,1)/ndim; ys0 = data(:,2)*ndim; DeltaMF = interp1(dataMF(:,1) ,dataMF(:,2), xs); ys = abs(ys0 - DeltaMF)*ndim; plot(xs, ys , 'x-'); if 1==rp, hold on, end end plot([phid,phid],[1e-3,1e0],'-k','color', [0.5,0.5,0.5]); %xlabel('$\hat\varphi$', 'interpreter', 'latex'); ylabel('$d \delta \hat\Delta_\mathrm{mode}$', 'interpreter', 'latex'); % \infty D})d xlim([0 40.5]); ylim([1e-3,1e0]); xticks(0:20:40); yticks([1e-3,1e-2,1e-1,1e0]); set(gca, 'yscale', 'log'); set(insetax, 'fontname', 'times new roman', 'fontsize', psize-4); %% panel (b) mean cage size nowpanel = axes('Position', [left+width+center, bottom, width, height]); dims = {'2D', '3D', '4D', '5D', '6D', '8D', '10D'}; for rp=1:length(dims) dim = dims{rp}; ndim = str2double(dim(1:end-1)); if ndim<8 % static fname = strcat('../data/cagetypical_', dim, '.dat'); data = dlmread(fname, '', 1, 0); % filter out percolated phi and small phi percofilt = data(:,2)<1e-3 & data(:,1) > 1.35*ndim; xs = data(percofilt,1); ys = data(percofilt,3); plot(xs/ndim, ys*ndim, 'x-'); else % dynamic fname = strcat('../data/cagestat_dy', dim, '.dat'); data = dlmread(fname, '', 1, 0); xs = data(:,1); ys = data(:,2); plot(xs/ndim, ys*ndim, 'x-'); end alldata{rp} = [xs, ys]; if 1==rp, hold on, end end plot(dataMF(:,1), dataMF(:,2), '--k', 'linewidth', 1.25); scatter(phid, deltad, 22, [0,0,0], 'filled'); text(3, 2.4, '$\hat\varphi_\mathrm{d}$', 'interpreter', 'latex', 'fontsize', psize); xlabel('$\hat\varphi$', 'interpreter', 'latex'); ylabel('$\hat{\Delta}_\mathrm{mean}$', 'interpreter', 'latex'); ylimrange = [1e-3,1e1]; xlim([0 40.5]); ylim(ylimrange); plot([phid,phid],ylimrange,'-k','color', [0.5,0.5,0.5]); xticks(0:10:40); yticks([1e-3, 1e-2, 1e-1, 1e0, 1e1]); set(gca, 'yscale', 'log'); h=legend([dims, '$\infty$D'], 'interpreter', 'latex', 'location', 'southwest', 'NumColumns', 2); %'$\infty$D' p=get(h, 'position'); p = p + [0.02, 0.02, 0, 0]; set(h, 'position', p, 'fontsize', psize-4); legend boxoff; set(nowpanel, 'fontname', 'times new roman', 'fontsize', psize); %% add inset insetax = axes('Position', [left+width+center+0.13, bottom+0.36, 0.13, 0.39]); for rp=1:length(dims) dim = dims{rp}; ndim = str2double(dim(1:end-1)); data = alldata{rp}; xs = data(:,1)/ndim; ys0 = data(:,2)*ndim; DeltaMF = interp1(dataMF(:,1) ,dataMF(:,2), xs); ys = abs(ys0 - DeltaMF)*ndim; plot(xs, ys , 'x-'); if 1==rp, hold on, end end plot([phid,phid],[1e-3,1e0],'-k','color', [0.5,0.5,0.5]); %xlabel('$\hat\varphi$', 'interpreter', 'latex'); ylabel('$d \delta \hat\Delta_\mathrm{mean}$', 'interpreter', 'latex'); % \infty D})d xlim([0 40.5]); ylim([1e-3,1e0]); xticks(0:20:40); yticks([1e-3,1e-2,1e-1,1e0]); set(gca, 'yscale', 'log'); set(insetax, 'fontname', 'times new roman', 'fontsize', psize-4); %% panel (c) theory cage size nowpanel = axes('Position', [left+width*2+center*2, bottom, width, height]); dims = {'2D', '3D', '4D', '5D', '6D', '8D', '10D'}; alldataC = {}; for rp=1:length(dims) dim = dims{rp}; ndim = str2double(dim(1:end-1)); fname = strcat('../data/csizeguassian_', dim,'.dat'); data = dlmread(fname, ''); [M, phididx] = min(data(:,2)); xs = data(1:phididx,2); ys = data(1:phididx,1); plot(xs, ys, '-'); alldataC{rp} = [xs, ys]; if 1==rp, hold on, end end plot(dataMF(:,1), dataMF(:,2), '--k', 'linewidth', 1.25); plot([phid,phid],ylimrange,'-k','color', [0.5,0.5,0.5]); scatter(phid, deltad, 22, [0,0,0], 'filled'); text(3, 2, '$\hat\varphi_\mathrm{d}$', 'interpreter', 'latex', 'fontsize', psize); xlabel('$\hat{\varphi}$', 'interpreter', 'latex'); ylabel('$\hat{\Delta}_\mathrm{G}$', 'interpreter', 'latex'); xlim([0 40.5]); ylim([1e-3, 1e1]); xticks(0:10:40); yticks([1e-3, 1e-2, 1e-1, 1e0, 1e1]); set(gca, 'yscale', 'log'); h=legend([dims, '$\infty$D'], 'interpreter', 'latex', 'location', 'southwest', 'NumColumns', 2); %'$\infty$D' p=get(h, 'position'); p = p + [0.02, 0.02, 0, 0]; set(h, 'position', p, 'fontsize', psize-4); legend boxoff; set(nowpanel, 'fontname', 'times new roman', 'fontsize', psize); %% add inset insetax = axes('Position', [left+width*2+center*2+0.1, bottom+0.36, 0.145, 0.4]); phis = [3, 4, 5, 7, 10:5:40]; dtmf = interp1(dataMF(:,1), dataMF(:,2), phis, 'spline'); for rp=1:length(dims) dim = dims{rp}; ndim = str2double(dim(1:end-1)); data = alldataC{rp}; dtfnd = interp1(data(:,1), data(:,2), phis, 'spline'); ys = (dtmf - dtfnd)*ndim; plot(phis, ys , '-'); if 1==rp, hold on, end end %xlabel('$\hat{\Phi}$', 'interpreter', 'latex'); ylabel('$d \delta \hat\Delta_\mathrm{G}$', 'interpreter', 'latex'); xlim([0 40.5]); ylim([5e-5,1e0]); xticks(0:20:40); yticks([1e-4,1e-3,1e-2,1e-1,1e0]); set(gca, 'yscale', 'log'); set(insetax, 'fontname', 'times new roman', 'fontsize', psize-4); %% end annotation('textbox',[0.005, 0.91, 0.1, 0.1], 'String', '(a)', 'EdgeColor','none', 'Fontname', 'Times New Roman','fontsize',psize); annotation('textbox',[0.335, 0.91, 0.1, 0.1], 'String', '(b)', 'EdgeColor','none', 'Fontname', 'Times New Roman','fontsize',psize); annotation('textbox',[0.67, 0.91, 0.1, 0.1], 'String', '(c)', 'EdgeColor','none', 'Fontname', 'Times New Roman','fontsize',psize); print('../figures/cagingfig_csizemetrics.eps', '-depsc');