# How to graph spherical harmonics in the Mac “Grapher” application?

I was wondering if it was possible to graph the spherical harmonics in the Mac grapher app. In their manual, there is a section that talks about graphing the spherical harmonics (page 54):

This is my attempt at graphing the spherical harmonic for l = 1 and m = 0:

There is clearly something wrong. My suspicion is that (for some reason) the application may be using a rectangular coordinate system, since this is the exact graph in rectangular coordinates. However, as you can see in the image, I am supposed to be in spherical coordinates. Any help would be greatly appreciated.

• You should probably convert your coordinates to x, y, z from $r,\theta, \phi$ as there does not seem to be another option in this programme. Alternatively use something else such as python/matplotlib but compared to just using a plotting programme there is a learning curve. – porphyrin Apr 13 '20 at 7:48
• When I start Grapher, I get to select 3D plot and which coordinate system to use. I chose the spherical one, and plotted your function. I got a sphere (s-type function). – Yoda Apr 13 '20 at 9:45
• @porphyrin Ok, so I took your suggestion and just used cartesian coordinates. When I plot the same graph, I get a sphere. However, shouldn't this particular spherical harmonic have 2 lobes (approximate "shape" of a p-orbital)? (interestingly, when I square the entire function, I get 2 lobes) – James Bond Apr 13 '20 at 14:16