Suppose $f$ $(X,d_x)$: $\rightarrow$ $(Y,d_y)$ is a function between metric spaces, and $X \times Y$ has the product topology.
The graph $G_f$ is the subspace $G_f$ = {$(x,f(x))$ | x $\in$ $X$}. If $Y$ is compact and $G_f$ is closed, then f is continuous.
My question is, what if $Y$ is not compact? I assume that this will no longer hold, but I cannot find a simple example to illustrate.
If you set $X = Y = \mathbb{R}$, you can construct examples fairly quickly. One example would be: