Logo Search packages:      
Sourcecode: matplotlib version File versions

surface3d_demo2.py

from mpl_toolkits.mplot3d import Axes3D
import pylab
import random
import numpy as np

fig = pylab.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')

pylab.show()


Generated by  Doxygen 1.6.0   Back to index