function fig1_4

clf
% get(gcf)
set(gcf,'Position', [8 1148 685 164])
co = [0 0 1;
    0 0.5 0;
    1 0 0;
    0 0.75 0.75;
    0.75 0 0.75;
    0.75 0.75 0;
    0.25 0.25 0.25];
set(groot,'defaultAxesColorOrder',co)

hold on
plot([0 5],[0 0],'k','LineWidth',2)
arrowhead([4.1 4.5],[0 0],'k',[0.5 1.2],1);
yf=-0.22;
text(1.95-1.52,yf,'$\frac{1}{2}$','Interpreter','Latex','FontSize',20)
text(1.95-0.97,yf+0.02,'$1$','Interpreter','Latex','FontSize',15)
text(1.95+0.03,yf+0.02,'$2$','Interpreter','Latex','FontSize',15)
text(1.97+2,yf+0.02,'$4$','Interpreter','Latex','FontSize',15)
text(1.95+2.4,yf+0.05,'$x$','Interpreter','Latex','FontSize',18)

L=2; R=4;
dx=0.2;
dy=0.07;
lw=1.5;
lwr=2.0;
for i=1:4
    if i==1
        plot([L+dx*(i-1) L+dx*(i-1)],[-dy dy],'r','LineWidth',lwr)
        plot([R-dx*(i-1) R-dx*(i-1)],[-dy dy],'r','LineWidth',lwr)
    else
        plot([L+dx*(i-1) L+dx*(i-1)],[-dy dy],'k','LineWidth',lw)
        plot([R-dx*(i-1) R-dx*(i-1)],[-dy dy],'k','LineWidth',lw)
    end
end

L=1; R=2;
dx=dx/2;
for i=1:4
    if i==1
        plot([L+dx*(i-1) L+dx*(i-1)],[-dy dy],'r','LineWidth',lwr)
        plot([R-dx*(i-1) R-dx*(i-1)],[-dy dy],'r','LineWidth',lwr)
    else
        plot([L+dx*(i-1) L+dx*(i-1)],[-dy dy],'k','LineWidth',lw)
        plot([R-dx*(i-1) R-dx*(i-1)],[-dy dy],'k','LineWidth',lw)
    end
end

L=0.5; R=1;
dx=dx/2;
for i=1:4
    if i==1
        plot([L+dx*(i-1) L+dx*(i-1)],[-dy dy],'r','LineWidth',lwr)
        plot([R-dx*(i-1) R-dx*(i-1)],[-dy dy],'r','LineWidth',lwr)
    else
        plot([L+dx*(i-1) L+dx*(i-1)],[-dy dy],'k','LineWidth',lw)
        plot([R-dx*(i-1) R-dx*(i-1)],[-dy dy],'k','LineWidth',lw)
    end
end

axis([0.2 4.5 -2*dy 2*dy])
box on
grid on
axis equal
axis off
set(gca,'FontSize',18,'FontWeight','bold')

%exportgraphics(gca,'/Users/mark/Desktop/line.png','Resolution',1200)



