title: Python: mplot3d, graphing a solid
body: <p>I'm trying to graph a wireframe solid of revolution. I'm following the example for a sphere <a href="http://matplotlib.sourceforge.net/plot_directive/mpl_examples/mplot3d/surface3d_demo2.py" rel="nofollow">here</a> but I'm a bit at a loss. I've simplified everything down, but am now stuck on an error. I'm also looking at the function arguments described <a href="http://matplotlib.sourceforge.net/mpl_toolkits/mplot3d/tutorial.html" rel="nofollow">here</a>, but unless I'm misunderstanding something, this code should be okay. I do realize that what I'm trying to draw here is a line and not a shape, but I don't understand why I can't use this method to draw it anyway. I'm trying to get this example as simple as possible so I can move on to graphing an actual solid. Here it is:</p>
  
  <pre><code>from mpl_toolkits.mplot3d import Axes3D
  import matplotlib.pyplot as plot
  import numpy
  import pylab
  
  fig = plot.figure()
  ax = Axes3D(fig)
  
  n = numpy.linspace(0, 100)
  
  x = n
  y = x**2
  z = 1
  ax.plot_wireframe(x, y, z)
  
  plot.show()
  </code></pre>
  
  <p>Here's the error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "test.py", line 14, in &lt;module&gt;
      ax.plot_wireframe(x, y, z)
    File "/usr/lib/pymodules/python2.6/mpl_toolkits/mplot3d/axes3d.py", line 687, in plot_wireframe
      rows, cols = Z.shape
  AttributeError: 'int' object has no attribute 'shape'
  </code></pre>