If you have data points like shown in said graph and you connect them with lines, you're basically doing linear interpolation. I take it that you're basically looking for a way to describe this graph as a single function $f(x)$. When plotting such a graph, which is a linear interpolation of points, you have to use a piecewise definition.
Let $y = f(x)$ with
$$f(x) = \begin{cases}2x+1 & \text{if } 0 \leq x < 1 \\\ -x+4 & \text{if } 1 \leq x \leq 4 \end{cases} $$
The resulting graph is then
![firstgraph](
You can see that the subfunctions themselves are still linear functions for the form $y_i = mx+t$.
![secondgraph](
I also think that you want to take a look at linear interpolation of a data set itself (<