I am writing code to plot spheres. I am generating random points using a separate function and I would like to add these as spheres to the same graph. For the moment, separate graphs are created for each sphere. The code is shown below. Disk here is a list of the form [x, y, z]. Also, is it possible to make the length of the x, y, and z axes equal? Many thanks.
def plot_disks2(disk, radius, c, ax=None):
fig = plt.figure(figsize=(12,12), dpi=300)
ax = fig.add_subplot(111, projection='3d')
u = np.linspace(0, 2 * np.pi, 100)
v = np.linspace(0, np.pi, 100)
x = radius * np.outer(np.cos(u), np.sin(v))
y = radius * np.outer(np.sin(u), np.sin(v))
z = radius * np.outer(np.ones(np.size(u)), np.cos(v))
ax.plot_surface(x+disk[0], y+disk[1], z+disk[2], rstride=4, cstride=4, color=c, linewidth=0, alpha=0.5)