# Shape of a wavefunction

I am trying to plotting the angular parts of a wavefunction ($Y_{(m,l)}(\theta, \phi)$) with Wolfram Mathematica. this is the table of spherical harmonics.

I think the shape of these function should looks round each part of p and d orbitals is a ellipsoid looks like an egg, like this figure: I have 2 question with my result:

1. All my figure of p orbitals only have half part the orbital above(examples: $p_0$ orbital and $p_y$ orbital). And all the d orbitals looks longer than that above (example: $d_{xz}$).   2. When I square the spherical haromics ($[Y_{(m,l)}(\theta, \phi)]^2$), The p orbitals looks the same as the top figure (example: $(p_y)^2$) ,but the p orbitals getting far longer and thinner than that before squared, also the figure in the top (example:$(d_{xz})^2$)

What's wrong with my plot or the shape is not looks like eggs? Do I miss something that make the figure only have half part?

Now, those nice puffy things above are the isosurfaces of $\psi$ function. This is a function of three variables, and it just so happens that it can be represented as a product: $$\psi(r,\varphi,\vartheta)=R(r)\cdot Y_{\ell,m}(\varphi,\vartheta)$$ You fix a value, find all points in 3D where the function takes that value, and plot them. That's what an isosurface is.
(By now, you might have noticed that the radial part $R(r)$ never appears at all in your attempts, so they got to be producing something different. And so they do.)
OK, then what are your plots? These are the spherical graphs of the angular component alone. You stay at the origin, point at the direction $(\varphi,\vartheta)$ with a stick having length $Y_{\ell,m}(\varphi,\vartheta)$, and leave a dot there. You don't care at all about the value of $\psi$ at that location. Besides, when $Y_{\ell,m}$ is negative (which it is half of the times), you point in the opposite direction. This, BTW, is the reason for having only one lobe in your p-orbital-like plots. No wonder you've got both lobes after you've squared $Y_{\ell,m}$ and thus made it always positive.
It could have been worse, you know. Think of a cone with its tip at the origin. Is it an isosurface of any function? Of course it is. What function? For example, $\cos\vartheta$ would do. What is the spherical graph of $\cos\vartheta$? A sphere, as you already know. Does a sphere look like a cone? Er, well...