(ax)
| 46 | |
| 47 | |
| 48 | def plot_sphere(ax): |
| 49 | # Create a sphere using spherical coordinates |
| 50 | phi = np.linspace(0, 2 * np.pi, 100) |
| 51 | theta = np.linspace(0, np.pi, 100) |
| 52 | phi, theta = np.meshgrid(phi, theta) |
| 53 | |
| 54 | # Compute the spherical coordinates |
| 55 | X = np.sin(theta) * np.cos(phi) |
| 56 | Y = np.sin(theta) * np.sin(phi) |
| 57 | Z = np.cos(theta) |
| 58 | |
| 59 | # Plot the wireframe |
| 60 | ax.plot_wireframe(X, Y, Z, color="gray", alpha=0.3) |
| 61 | |
| 62 | |
| 63 | # plot the distributions |
no test coverage detected