I'm considering functions $f : \mathbb{R} \to \mathbb{R}$ with the codomain extended to the extended reals $\mathbb{R} \cup \{\pm\infty\}.$ Now if $f$ is continuous then the function $g : \mathbb{R} \times \overline{\mathbb{R}} \to \mathbb{R} : (x, y) \mapsto y - f(x)$ is also continuous. Then the graph of $f$ is the set $g^{-1}(\{0\})$ and is therefore closed.
It seems plausible that the converse is true - that is, that if the graph of $f : \mathbb{R} \to \overline{\mathbb{R}}$ is closed then $f$ is continuous - but I wouldn't be too surprised if there's an annoying counterexample.
Is the converse true?