function Figure4_5d

% Matlab code for Figure 4.5(d) in book:
% Radek Erban and Jon Chapman, Stochastic Modelling of Reaction-Diffusion
% Processes, Cambridge University Press, 2019

close all;

r=[1:0.01:10];
c=10*(1-1./r);

figure(1);
set(gca,'Fontsize',18);
fill([0 1 1 0 0],[0 0 12 12 0],'y');
hold on;
plot([1;4.75],[10;10],'--k','Linewidth',2);
plot([5.8;10],[10;10],'--k','Linewidth',2);
plot([1;1],[0;12],'k','Linewidth',3);
h=plot(r,c,'b','Linewidth',4);
xlabel('$r$ [mm]','interpreter','latex');
hh=legend(h,'$c(r)$');
set(hh,'interpreter','latex','Fontsize',18);
set(hh,'location','southeast');
text(5,10,'$c_\infty$','Fontsize',18,'interpreter','latex');
set(gca,'XTick',[0 1 2 3 4 5 6 7 8 9]);
hhh=set(gca,'XTickLabel',{'0';'';'2';'3';'4';'5';'6';'7';'8';'9'});
set(hhh,'interpreter','latex','Fontsize',18);
text(0.8,-0.86,'$r_0$','Fontsize',18,'interpreter','latex');
set(gca,'YTick',[0 2 4 6 8 10]);
axis([0 10 0 12]);
set(gca,'Fontsize',18);

