Function is continuous if graph is compact. Let $X$ be a Hausdorff space and let $f:X\to \mathbb{R}$. If grapph of $f$ is compact we have to show that $f$ is continuous. 
Since every closed subset of a Hausdorff space is closed, therefore grapph of $f$  is closed. WE know that if $f:X\to Y$ and $Y$ is compact, then graph of $f$ is clsed implies $f$ is continuous. But here $\mathbb R$ is not compact. Please help!
 A: Proof without nets:
Let $G$ be the graph of $f$. 
Suppose $G$ is compact. 
Let $A$ be closed in $\mathbb R$.  We show $f^{-1} [A]$ is closed.
Note that $f^{-1}[A]=\pi_X [G\cap (X\times A)]$. 
Since $G\cap (X\times A)$ is compact and the projection $\pi _X$ is continuous, $f^{-1}[A]$ is compact. 
$X$ is Hausdorff, so every compact subset of $X$ is closed.  DONE! 
A: Fix $x_0 \in X$ and let $x_a$ be a net converging to $x_0$ in $X$. You need to show $f(x_a)\rightarrow f(x_0)$ in $\mathbb{R}$. Let $G_f$ denote the graph of $f$, which is a subset of $X \times \mathbb{R}$. Then $(x_a,f(x_a))$ is a net in $G_f$, which is compact, so we can extract a convergent subnet $(x_b,f(x_b)) \rightarrow (x,y) \in G_f$. But then $x_b \rightarrow x$ and since $x_a \rightarrow x_0$, we have $x=x_0$ by uniqueness of limits (Hausdorff). Then $y=f(x_0)$ since $(x,y) \in G_f$. This means $f(x_b) \rightarrow f(x_0)$. 
Now, do this argument for ANY subnet of $x_a$ to conclude that the whole net $f(x_a)$ converges to $f(x_0)$.
