Former-commit-id:a02aeb236c
[formerly9f19e3f712
] [formerlya02aeb236c
[formerly9f19e3f712
] [formerly06a8b51d6d
[formerly 64fa9254b946eae7e61bbc3f513b7c3696c4f54f]]] Former-commit-id:06a8b51d6d
Former-commit-id:8e80217e59
[formerly3360eb6c5f
] Former-commit-id:377dcd10b9
17 lines
398 B
Python
Executable file
17 lines
398 B
Python
Executable file
from mpl_toolkits.mplot3d import Axes3D
|
|
import matplotlib.pyplot as plt
|
|
import numpy as np
|
|
|
|
fig = plt.figure()
|
|
ax = Axes3D(fig)
|
|
|
|
u = np.linspace(0, 2 * np.pi, 100)
|
|
v = np.linspace(0, np.pi, 100)
|
|
|
|
x = 10 * np.outer(np.cos(u), np.sin(v))
|
|
y = 10 * np.outer(np.sin(u), np.sin(v))
|
|
z = 10 * np.outer(np.ones(np.size(u)), np.cos(v))
|
|
ax.plot_surface(x, y, z, rstride=4, cstride=4, color='b')
|
|
|
|
plt.show()
|
|
|