I had asked this question: [Characterising Continuous functions](https://math.stackexchange.com/questions/4412/characterising-continuous-functions) some time back, and this question is more or less related to that question.

Suppose we have a function $f: \mathbb{R} \to \mathbb{R}$ and suppose the set $G = \\{ (x,f(x) : x \in \mathbb{R}\\}$ is connected and closed in $\mathbb{R}^{2}$, then does it imply $f$ is continuous?