Spherical coordinates plot in matplotlib
问题 R(teta, phi) = cos(phi^2), teta[0, 2*pi], phi[0,pi] How to draw a graph of this function (R(teta, phi)) in spherical coordinates with the help of matplotlib? The documentation I have not found Spherical coordinates. 回答1: The code below is very much like the 3D polar plot from the Matplotlib gallery. The only difference is that you use np.meshgrid to make 2D arrays for PHI and THETA instead of R and THETA (or what the 3D polar plot example calls P ). The moral of the story is that as long as X