putting a complex structure on a graph I am studying Riemann Surfaces, and an example that comes up in two of my references, as a preamble to smooth affine plane curves, is the following:
Let $D$ be a domain in the complex plane, and let $g$ be holomorphic on $D$; giving the graph the subspace topology, and letting the charts be open subsets of the graph with maps given by projection, we get an atlas and hence the graph admits a complex structure.  Clearly on any overlap the transition function will be identity so that is all good; my confusion is, why did $g$ have to be holomorphic to begin with?  Couldn't we have done the exact same thing with a continuous function?  For that matter, couldn't we take any function at all, and let the atlas of the graph consist of one chart, namely the whole set, with the projection map? I think the issue, at least for the more extreme second example, would be that the structure would not be compatible with the subspace topology, but I don't see what the issue is with $g$ just being a continuous function.
Thank you for any insight.

Suppose $g$ is a continuous complex-valued function on $D$. Then the set $\Omega=\{(z,g(z))\in\mathbb C^2: z\in D\}$, which gets  the subspace topology from $\mathbb C^2$, is homeomorphic to $D$ via $z\mapsto (z,g(z))$. By declaring this homeomorphism to be an isomorphism of complex structures, we can make $\Omega$ a complex manifold. No problem at all. 
By construction, $\Omega$ is an embedded submanifold of $\mathbb C^2$ in the sense of topological manifolds. But in general it is not a complex submanifold of $\mathbb C^2$, because the inclusion map $\Omega\to \mathbb C^4$ is not holomorphic. Indeed, due to our definition of the complex structure on $\Omega$, the inclusion map is holomorphic if and only if the map $D\to\mathbb C^2$ defined by $z\mapsto (z,g(z))$ is holomorphic. The latter happens precisely when $g$ is a holomorphic function. 
