\documentclass[preview]{standalone}

\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{patterns}

\usepackage[bitstream-charter]{mathdesign}
\usepackage{fontspec}

\DeclareSymbolFont{usualmathcal}{OMS}{cmsy}{m}{n}
\DeclareSymbolFontAlphabet{\mathcal}{usualmathcal}

\DeclareSymbolFont{mpazo}{U}{fplmbb}{m}{n}
\DeclareSymbolFontAlphabet{\mathbb}{mpazo}

\setmainfont[%
  Path=$HOME/.fonts/truetype/ ,
  Extension      = .ttf       ,
  UprightFont    = *-R        ,
  ItalicFont     = *-I        ,
  BoldFont       = *-B        ,
  BoldItalicFont = *-BI       ,
  Scale=0.9 ,
]{CharisSIL}
\defaultfontfeatures[CharisSIL]{Script=latn, Ligatures=TeX}

\usepackage{caption}

\begin{document}
\begin{figure}
  \centering
  \begin{tikzpicture}[thick,scale=1.6, every node/.style={scale=1.6}]
    \draw[->] (0, 0) -- (5.2cm, 0) node[right] {$t$};
    \draw[->] (0, 0) -- (0, 5.2cm) node[above] {$v(t)$};

    % Mark the x_1, ..., x_4 points.
    \foreach \x in {1, ..., 4}
    \draw (\x, 0pt) node[below] {$t_{\x}$} -- (\x, 1pt);

    % (x_1, y_1) -- (x_2, y_2), and vertical dashed line under (x_1, y_1).
    \draw[thick, black, fill=black] (1cm, 1.5cm) circle (0.2mm);
    \draw[thick, black, fill=black] (2cm, 1.5cm) circle (0.2mm);
    \draw[dashed] (1cm, 0cm) -- (1cm, 1.5cm);
    \draw[dashed, gray, thin] (0cm, 1.5cm) node[black, left] {$v_{12}$} -- (1cm, 1.5cm);
    \draw[-] (1cm, 1.5cm) -- (2cm, 1.5cm);

    % (x_2, y_2) -- (x_3, y_3), and vertical dashed line under (x_2, y_2).
    \draw[thick, black, fill=black] (2cm, 2.7cm) circle (0.2mm);
    \draw[thick, black, fill=black] (3cm, 2.7cm) circle (0.2mm);
    \draw[dashed] (2cm, 0cm) -- (2cm, 2.7cm);
    \draw[dashed, gray, thin] (0cm, 2.7cm) node[black, left] {$v_{23}$} -- (2cm, 2.7cm);
    \draw[-] (2cm, 2.7cm) -- (3cm, 2.7cm);

    % (x_3, y_3) -- (x_4, y_4), and vertical dashed line under (x_3, y_3).
    \draw[thick, black, fill=black] (3cm, 4.0cm) circle (0.2mm);
    \draw[thick, black, fill=black] (4cm, 4.0cm) circle (0.2mm);
    \draw[dashed] (3cm, 0cm) -- (3cm, 4.0cm);
    \draw[dashed, gray, thin] (0cm, 4.0cm) node[black, left] {$v_{34}$} -- (3cm, 4.0cm);
    \draw[-] (3cm, 4.0cm) -- (4cm, 4.0cm);

    % The only vertical dashed line missing: under (x_4, y_4).
    \draw[dashed] (4cm, 0cm) -- (4cm, 4.0cm);

    \draw [cyan, thin] plot [smooth] coordinates {(0.8cm, 1.3cm) (1cm, 1.5cm) (2cm, 2.7cm) (3cm, 4.0cm) (4cm, 4.8cm)};

    % Fill t_1 -- t_2 rectangle.
    \fill[pattern=north west lines, pattern color=blue] (1cm, 0cm) rectangle (2cm, 1.5cm);

    % Fill t_2 -- t_3 rectangle.
    \fill[pattern=north east lines, pattern color=green] (2cm, 0cm) rectangle (3cm, 2.7cm);

    % Fill t_3 -- t_4 rectangle.
    \fill[pattern=north west lines, pattern color=red] (3cm, 0cm) rectangle (4cm, 4.0cm);
  \end{tikzpicture}
  \caption*{Areas of the coloured sections:\\[1em]
    \tikz[anchor=center]\fill[pattern=north west lines, pattern color=blue] (0pt, 0pt) rectangle (10pt, 10pt) (10pt, 5pt) node[right] {$s_2-s_1$};
    \hspace{2em}\tikz[anchor=center]\fill[pattern=north west lines, pattern color=green] (0pt, 0pt) rectangle (10pt, 10pt) (10pt, 5pt) node[right] {$s_3-s_2$};
    \hspace{2em}\tikz[anchor=center]\fill[pattern=north west lines, pattern color=red] (0pt, 0pt) rectangle (10pt, 10pt) (10pt, 5pt) node[right] {$s_4-s_3$};}
  % https://tex.stackexchange.com/questions/594856/how-to-align-tikz-inline-nodes-label-with-text-outside
\end{figure}
\end{document}