Nate’s is nicer, but here’s an example based on the proposer’s original idea.
Topologize $\mathbb{Z}$ as follows: each even integer is an isolated point, and if $n$ is odd, a set $V$ is a nbhd of $n$ iff $V\supseteq\mathbb{Z}\setminus 4\mathbb{Z}$. Call the resulting space $X$. Let $A=\{4n+1:n\in\mathbb{Z}\}$, give $D=\{0,1\}$ the discrete topology, and let $f:X\to D$ be the indicator (characteristic) function of $A$. Clearly $f$ is not continuous, since $A=f^{-1}[\{1\}]$ is not open in $X$.
Now let $G$ be the graph of $f$. The set of isolated points of $G$ is
$I=\Big(A\times\{1\}\Big)\cup\Big(2\mathbb{Z}\times\{0\}\Big)\;.$
If $p\in G\setminus I$, then $p=\langle 4n+3,0\rangle$ for some $n\in\mathbb{Z}$, and a set $V\subseteq G$ is a nbhd of $p$ in $G$ iff $V\supseteq \Big(\mathbb{Z}\setminus \big(A\cup 4\mathbb{Z}\big)\Big)\times\{0\}$. From this it’s not hard to check that the function
$h(n)=\begin{cases} \left\langle \frac{n}2,0\right\rangle,&\text{if }n\equiv 0\pmod 8\\\\ \left\langle\frac{n}2-1,1\right\rangle,&\text{if }n\equiv 4\pmod 8\\\\ \langle n,0\rangle,&\text{if }n\equiv 2\pmod 4\\\\ \langle 2n+1,0\rangle,&\text{if }n\equiv 1\pmod 2 \end{cases}$
is a homeomorphism of $X$ onto $G$: the first two clauses match up the isolated points that don’t have to belong to nbhds of the non-isolated points; the third matches up the other isolated points; and the fourth matches up the non-isolated points.