% Genartes Figure 10.5 (right)

close all; clear all
rho=linspace(0,12,100);

k=(0:10)';
a=diag((-1).^k./(2*k+1))*sech((k+1/2)*rho*pi);
p=4/pi*sum(a);

semilogy(rho,p,'k-',rho,8/pi*exp(-pi/2*rho),'r:','LineWidth',2)
set(gca,'FontSize',18,'FontWeight','normal','FontName','Times');
legend('{\itp}','8e^{-\pi {\it\rho}/2}/\pi')
axis([0,12,1e-8,8/pi])
hold on

rho = [1 sqrt(3) 10];
k=(0:10)';
a=diag((-1).^k./(2*k+1))*sech((k+1/2)*rho*pi);
p=4/pi*sum(a);

semilogy(rho,p,'k.','MarkerSize',18)
set(gca,'XTickMode','manual','XTick',[0 1 sqrt(3) 5 10 12],...
    'XTickLabel',{'0','1','','5','10','12'});
xlabel('Aspect ratio {\it\rho}','FontWeight','normal','FontSize',24);
ylabel('Probability{} {\itp}','FontWeight','normal','FontSize',24);
text(sqrt(3),0.5e-8,'\surd3','FontWeight','normal','FontSize',18,...
         'HorizontalAlignment','center','FontName','Times')
text(1,1/2,'1/2','FontWeight','normal','FontSize',18,...
         'HorizontalAlignment','left','VerticalAlignment','bottom',...
         'FontName','Times')
text(sqrt(3),1/6,'1/6','FontWeight','normal','FontSize',18,...
         'HorizontalAlignment','left','VerticalAlignment','bottom',...
         'FontName','Times')
text(10,3.837587979251228e-007,'{\itp}|_{\rho=10}','FontWeight','normal','FontSize',18,...
         'HorizontalAlignment','left','VerticalAlignment','bottom',...
         'FontName','Times')
% print -deps2c rho2.eps