title: matplotlib plot_surface plot
body: <p>The matplotlib tutorial provides a nice example of how to draw a spherical suface:</p>
  
  <pre><code>from mpl_toolkits.mplot3d import Axes3D
  import matplotlib.pyplot as plt
  import numpy as np
  
  fig = plt.figure()
  ax = fig.add_subplot(111, projection='3d')
  
  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')
  
  plt.show()
  </code></pre>
  
  <p>From what I understand, this creates a 2D grid for each <code>x</code>, <code>y</code>, and <code>z</code> variable corresonding to the product of the parameters <code>u</code> and <code>v</code>. The calculated <code>x</code>, <code>y</code>, and <code>z</code> variables are then the cartesian coordinates created from the spherical coordinates in <code>u</code> and <code>v</code>.</p>
  
  <p>My question is the following: <strong>Why does the input</strong> to <code>plot_surface</code> <strong>have to be in 2D arrays?</strong></p>
  
  <p>I suspect it has something to do with calculating the normals of each of the surface faces, but I can't seem to figure it out. Is there some detailed documentation that describes this?</p>
  
  <p><a href="https://stackoverflow.com/q/11486973/899470">This question</a> seems to ask something similar, but the single answer isn't particularly enlightening.</p>