In [33]:
# Axes3D.scatter(xs, ys, zs=0, zdir='z', s=20, c=None, depthshade=True, *args, **kwargs)
%matplotlib inline

import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

plt.show()



In [14]:
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

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

plt.show()



In [24]:
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

thet = np.linspace(-4*np.pi, 4*np.pi, 100)
r = 5.

x = np.arange(100)
y = r * np.sin(thet)
# z = np.random.random(100)
z = np.cos(thet)

ax.plot(x, y, z, label='parametric curve')
ax.legend()

plt.show()



In [37]:
X[0], X[1]


Out[37]:
(array([ 0.25373505,  0.73694118,  0.10460484]),
 array([ 0.5804473 ,  0.31016388,  0.46859406]))

In [38]:
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

X = np.random.random((100,3))

ax.scatter(X[:,0], X[:,1], X[:,2])


Out[38]:
<mpl_toolkits.mplot3d.art3d.Path3DCollection at 0x112590160>

In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]: