I found this Wikipedia article on Linear Interpolation. The third figure down depicts a data set
0 0
1 0.8415
2 0.9093
3 0.1411
4 -0.7568
5 -0.9589
6 -0.2794
which I got from checking out the Gnuplot source. In the article it talks about this formula
\begin{align} y = y_{0 }+ (x - x_{0})\frac{(y_{1 }- y_{0})}{(x_{1} - x_{0})} = \frac{y_{0}(x_{1} - x) + y_{1}(x - x_{0})}{(x_{1} - x_{0})} \end{align}
Now, if I wanted a function like $y = mx + b$ to plot this data, i.e., to draw the "curve" in the diagram, it seems I would have to "glue together" the individual segments or linear interpolants somehow. Would it be something like this?
\begin{align*} s(x) = \left\{ \begin{array} {r@{\quad \mathrm{if} \quad}l} \frac{y_{0}(x_{1} - x) + y_{1}(x - x_{0})}{(x_{1} - x_{0})} & \, 0 < x < 1, \\ \!\! \frac{y_{1}(x_{2} - x) + y_{2}(x - x_{1})}{(x_{2} - x_{1})} & 1 < x < 2, \\ \ldots \end{array} \right . \end{align*}