% Schematic9.m
clf; clear; xr = 180; nx = 180; x = linspace(0, xr, nx+1);
aa = ones(1,nx+1); h = x(2)-x(1);
fs = 20; %fontsize
fs2 = 18;
hold on
% x_axis
line([x(1) x(end)+20],[x(1) x(1)],'color','k','linewidth',2);
plot(x(end)+20,0,'k>','MarkerEdgeColor','k','MarkerFaceColor',...
'k','MarkerSize',10);
text('Interpreter','latex','String','$$S(\tau)$$',...
    'Position',[175.5 -10.2],'FontSize',fs2)
text('Interpreter','latex','String','$$\bf{85}$$',...
    'Position',[72.27 -8.949],'FontSize',fs2)
text('Interpreter','latex','String','$$\bf{90}$$',...
    'Position',[92.38 -8.949],'FontSize',fs2)
text('Interpreter','latex','String','$$\bf{95}$$',...
    'Position',[112.1 -8.949],'FontSize',fs2)
% y_axis
line([x(1) x(1)],[-10 x(180)+10],'color','k','linewidth',2);
plot(x(1),x(180)+10,'k^','MarkerEdgeColor','k',...  
    'MarkerFaceColor','k','MarkerSize',10);
text('Interpreter','latex','String','$$u(x,y,z,\tau)$$',...
    'Position',[-31.92 199.5],'FontSize',fs2,'color','k')
text('Interpreter','latex','String','$$\bf{0}$$',...
    'Position',[-9.428 -0.4867],'FontSize',fs2)
text('Interpreter','latex','String','$$\bf{105}$$',...
    'Position',[-22.49 69.03],'FontSize',fs2)
text('Interpreter','latex','String','$$\bf{110}$$',...
    'Position',[-22.49 88.83],'FontSize',fs2)
text('Interpreter','latex','String','$$\bf{115}$$',...
    'Position',[-22.49 109],'FontSize',fs2)
text('Interpreter','latex','String','$$\bf{120}$$',...
    'Position',[-22.49 128.8],'FontSize',fs2)
text('Interpreter','latex','String','$$\bf{125}$$',...
    'Position',[-22.49 149],'FontSize',fs2)
text('Interpreter','latex','String','$$\tau = \tau_1$$',...
    'Position',[171.9 148.6],'FontSize',fs2)
text('Interpreter','latex','String','$$\tau = \tau_2$$',...
    'Position',[171.9 129.2],'FontSize',fs2)
text('Interpreter','latex','String','$$\tau = \tau_3$$',...
    'Position',[171.9 108.8],'FontSize',fs2)
text('Interpreter','latex','String','$$\tau = \tau_4$$',...
    'Position',[171.9 88.45],'FontSize',fs2)
text('Interpreter','latex','String','$$\tau = \tau_5$$',...
    'Position',[171.9 68.54],'FontSize',fs2)
en = 170;
% starting level
line([x(en) x(en)],[0 x(en)],'color','k','linewidth',1, ...
    'linestyle','-');
% step01)tau1
i = 80; line([x(i) x(i)],[x(1) x(150)],'color','k', ...
   'linewidth',2,'linestyle',':');
i = 150; line([x(1) x(80)],[x(i) x(i)],'color','k', ...
   'linewidth',2,'linestyle',':');
line([x(80) x(170)],[x(150) x(150)],'color','k', ...
    'linewidth',3,'linestyle','-');
plot(x(80),x(150),'ks','MarkerEdgeColor','k', ...
    'MarkerFaceColor','k','MarkerSize',10);
% step02)tau2
i = 100; line([x(i) x(i)],[x(1) x(130)],'color','k', ...
    'linewidth',2,'linestyle',':');
i = 130; line([x(1) x(100)],[x(i) x(i)],'color','k', ...
    'linewidth',2,'linestyle',':');
line([x(100) x(170)],[x(130) x(130)],'color','k', ...
    'linewidth',3, 'linestyle','-');
plot(x(100),x(130),'ks','MarkerEdgeColor','k', ...
    'MarkerFaceColor','k', 'MarkerSize',10);
% step03)tau3
i = 120; line([x(i) x(i)],[x(1) x(110)],'color','k', ...
    'linewidth',2,'linestyle',':');
i = 110; line([x(1) x(120)],[x(i) x(i)],'color','k', ...
    'linewidth',2,'linestyle',':');
line([x(100) x(170)],[x(110) x(110)],'color','k', ...
    'linewidth',3,'linestyle','-');
plot(x(100),x(110),'ks','MarkerEdgeColor','k', ...
    'MarkerFaceColor','k','MarkerSize',10);
% step04)tau4
i = 120; line([x(i) x(i)],[x(1) x(90)],'color','k', ...
    'linewidth',2,'linestyle',':');
i = 90; line([x(1) x(120)],[x(i) x(i)],'color','k', ...
    'linewidth',2,'linestyle',':');
line([x(120) x(170)],[x(90) x(90)],'color','k', ...
    'linewidth',3,'linestyle','-');
plot(x(120),x(90),'ks','MarkerEdgeColor','k', ...
    'MarkerFaceColor','k','MarkerSize',10);
% step05)tau5
i = 120; line([x(i) x(i)],[x(1) x(70)],'color','k', ...
    'linewidth',2,'linestyle',':');
i = 70; line([x(1) x(120)],[x(i) x(i)],'color','k', ...
    'linewidth',2,'linestyle',':');
line([x(120) x(170)],[x(70) x(70)],'color','k', ...
    'linewidth',3,'linestyle','-');
plot(x(120),x(70),'ks','MarkerEdgeColor','k', ...
    'MarkerFaceColor','k','MarkerSize',10);
axis off
axis([-10 x(end)+30 -10 x(end)+10])
set(gcf,'PaperPositionMode','auto')