I am sorry this problem may be too general, I know the projection, but I don't get why the function $f$ ($f \in L^2(I)$, interval $I=[0, L]$)can be plotted like a vector in this picture?
If this is hard to be answered, please provide some reference, I will read.

That picture is just a schematic to illustrate the idea that $f$ can be uniquely decomposed into two parts, one of which lying in the subspace $V_h$ and the other being orthogonal to every element of $V_h$. There’s nothing more to it than that.