# Problem with SphericalPlot3D plotting

I want to plot the real part of the SphericalHarmonicY[1,1,θ,φ]. That is, I want to plot

$$- \frac{1}{2}\sqrt {\frac{3}{{2\pi }}} \cos[\phi ]\sin[\theta ]$$

To do so, I evaluated the following expression:

SphericalPlot3D[-(1/2) Sqrt[3/(2 π)] Cos[φ] Sin[θ], {θ, 0, π}, {φ, 0, 2 π}]


But the result I got doesn't show the negtive part. What is wrong? • What a negative part do you expect ? – Artes Jan 1 '13 at 13:41
• Possible duplicate: mathematica.stackexchange.com/questions/16534/… – Mr.Wizard Jan 1 '13 at 14:22
• @Mr.Wizard, I don't think it's a duplicate. That question is about colouring the plot; this one is about parts of the desired plot not showing up at all. Unless there's some subtle property of Mathematica I'm missing that makes these the same thing, which, given that Mathematica is sufficiently complicated, is a possibility I won't dismiss... – Rahul Jan 1 '13 at 14:36
• @Rahul Someone flagged this post to be closed but didn't post that link. I chose not to close the question myself, but I put the link there for others to decide. – Mr.Wizard Jan 1 '13 at 14:38

The negative part is plotted with negative radius, so it's at the opposite position of where you expect it -- it's exactly overlapping the positive part. You'll have to plot its absolute value or its square, as Nasser suggests, and indicate its negativeness using a different colour or something. Here's one way to do it:

f[θ_, φ_] := -(1/2) Sqrt[3/(2 π)] Cos[φ] Sin[θ]
pos[x_] := If[x >= 0, x, Null]
SphericalPlot3D[{pos[f[θ, φ]], pos[-f[θ, φ]]},
{θ, 0, π}, {φ, 0, 2 π},
PlotStyle -> {Lighter@Lighter@Red, Lighter@Lighter@Blue},
Lighting -> "Neutral"] • Is there an easy way to replace the escaped characters with their Unicode equivalents? I searched on meta but only found rcollyer saying they would do this, but not how to do so. – Rahul Jan 1 '13 at 14:27
• Oh well, I pasted them in from Character Map. Hope I didn't make a mistake somewhere. – Rahul Jan 1 '13 at 15:09
• you can type $\phi$ within the editor and then cut an paste the rendered version. – chris Jan 1 '13 at 15:56
• +1 and thanks for the concern about rendered chars. I hate having to read \[WhateverCharYouWant] – Dr. belisarius Jan 1 '13 at 17:47
• @RahulNarain Have you seen this: How to “Copy as Unicode” from a Notebook? – Jens Jan 1 '13 at 20:16