Is the graph of a continuous function homeomorphic to its domain?

If $f: X \to Y$ is continuous, $\Gamma(f)=\{(x,f(x)): x \in X \} \subseteq X \times Y$ is homeomorphic to $X$.

The homeomorphism is the obvious $h: X \to X \times Y$ defined by $h(x)=(x,f(x))$ which is continuous as a map into $X \times Y$ as $\pi_X \circ h = 1_X$ and $\pi_Y \circ h = f$ are both continuous, by the universal mapping property of the product. And by definition $h[X]=\Gamma(f)$.

And the continuous inverse of $h$ is $\pi_X\restriction_{\Gamma(f)}$, which is continuous as the restriction of a continuous map.