TITLE: Is a continuous function simply a connected function?
QUESTION [12 upvotes]: Intuitively, a function $\mathbb{R}\rightarrow\mathbb{R}$ is continuous if you can draw its graph without taking the pen off the page. This suggests the following theorem:
A map $f:X \rightarrow Y$ is continuous if and only if $f$ is connected in the product topology $X \times Y$.
Is this true? And if not, can anyone think of an additional premise or two that would make it true?

REPLY [13 votes]: It isn't true in general. An obvious  variant of the Topologist's sine curve provides an example of a function $f:\Bbb R\rightarrow \Bbb R$ whose graph is  connected but fails to be continuous (at $x=0$).
However, this article shows that "it is correct to conclude that continuous real functions over $\Bbb R$ are those functions over $\Bbb R$ whose graphs, in the plane $\Bbb R^2$, are both closed and connected".