The multivariable limit $\lim_{(x,y)\to (x_0,y_0)} f(x,y)$ exists and is equal to some scalar $L$ if and only if the limit $\lim_{t\to 1} f(r(t))$ exists and is equal to $L$ for all functions $r:\mathbb{R}\to \mathbb{R}^2$ such that $\lim_{t\to 1} r(t) = (x_0, y_0)$. It is common to use this fact as a way to conclude that a certain limit does not exist, by checking that taking the limit along different paths leads to different limits or by showing that the limit along a certain path does not exist. I wonder if this characterizarion can be weakened in the following way:
The multivariable limit $\lim_{(x,y)\to (x_0,y_0)} f(x,y)$ exists and is equal to some scalar $L$ if and only if $\lim_{y\to y_0} f(x_0,y)=L$ and $\lim_{x\to x_0} f(x,g(x)) = L$ for all functions $g:\mathbb{R}\to \mathbb{R}$ such that $\lim_{x\to x_0} g(x) = y_0$.
That is, it the limit exists and is the same going through all graphs of functions $g(x)$ and through the $y$ axis, can I conclude the existence of the multivariable limit?
EDIT: I substituted my initial condition of $\lim_{y\to y_0} \lim_{x\to x_0} f(x,y)=L$ by $\lim_{x\to x_0} f(x,g(x)) = L$ since, as José Carlos Santos noted in the comments, formalizes better the idea of approaching the limit vertically.