Logo Search packages:      
Sourcecode: matplotlib version File versions

lines3d_demo.py

import matplotlib as mpl
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import pylab

mpl.rcParams['legend.fontsize'] = 10

fig = pylab.figure()
ax = Axes3D(fig)
theta = np.linspace(-4 * np.pi, 4 * np.pi, 100)
z = np.linspace(-2, 2, 100)
r = z**2 + 1
x = r * np.sin(theta)
y = r * np.cos(theta)
ax.plot(x, y, z, label='parametric curve')
ax.legend()

pylab.show()


Generated by  Doxygen 1.6.0   Back to index