I have a non-static set of points
How do I get the equation of a graph passing through all these points? The graph should consist of straight lines, as in the picture
As in the picture below, except that it's not a table, but one equation

On
You can define piecewise linear function. If you have nodes $$x_1<x_2<\ldots<x_n$$ and the desired function has to satisfy the set of conditions $f(x_i)=y_i$ for $1\leq i\leq n$ then one can define $f$ by the formula $$f(x) = \frac{y_{k+1}-y_k}{x_{k+1}-x_k}\cdot(x-x_k)+y_k,\quad x_k\leq x\leq x_{k+1}.$$ This defines $f$ on $[x_1,x_k]$.
You can also be interested in splines, which are piecewise polynomial functions and can be not only continuous but also differentiable.
Here is a solution with degree-$1$ splines for the following data :
$$\begin{array}{|c|c|c|c|c|c|} \hline x_i&0&1&3&5&6&9\\ \hline y_i&0&4&1.5&3&-0.5&0\\ \hline\end{array}$$
with solution given by a linear combination
$$f(x)=\sum y_i t_{x_{i},x_{i+1},x_{i+2}}(x)$$
of the piecewise linear continuous "tent functions" (or "triangular functions") defined in the following way:
$$t_{a,b,c}(x)=\begin{cases}&1 \ \ \text{for} \ x=b\\ &0 \ \ \text{for x outside} \ (a,c) \end{cases}$$
Remark: please note that the coefficients of the linear combination of these tent functions are precisely values $y_i$. If we take all coefficients equal to $1$, we will get a trapezoidal function with a plateau sum of these "tent functions" is a "trapezoidal function" with a "plateau at "1".
Fig. 1: All the basis "tent functions" colored in blue, green, purple, black resp. have their maximum equal to $1$.
We can use the Newton interpolation polynomial to get
$$f(x) = \sum_{i = 0}^n a_in_i(x) \; \text{where} \; n_i(x)=\prod_{j = 0}^{i−1}(x−x_j)$$
We can now calculate the divided differences as follows
$$a_0 = y_0 = -6.13$$
$$a_1 = \frac{y_1 - y_0}{x_1 - x_0} = \frac{-3.61 + 6.13}{-0.32 + 9.17} = \frac{84}{295}$$
$$a_2 = \frac{\frac{y_2 - y_1}{x_2 - x_1} - a_1}{x_2 - x_0} = \frac{\frac{-5.6 + 3.61}{4 + 0.32} - \frac{84}{295}}{4 + 9.17} = \frac{-474965}{8391924}$$
$$...$$
The resulting polynomial is
$$f(x) \approx 4.90547\times10^{-6}x^{6}-0.000246778x^{5}+0.00296915x^{4}+0.0154116x^{3}-0.323696x^{2}+0.380018x-3.45477$$