title: Python plt.axis('Equal') xlim
body: <p>I have a simple 3D surface plot in which I want the axes to be equal in all directions.
  I have the following piece of code:</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  from mpl_toolkits.mplot3d import Axes3D
  from matplotlib import cm
  
  X = np.array([-100,   0,  100])
  Y = np.array([   0,  10,   20])
  
  X_grid, Y_grid = np.meshgrid(X,Y)
  
  Z_grid = np.matrix('0 10 4;'
                  '1 11 3;'
                  '0 10 5')
  
  fig = plt.figure()
  ax = fig.gca(projection='3d')
  surf = ax.plot_surface(X_grid, Y_grid, Z_grid, rstride=1, cstride=1, cmap=cm.coolwarm, linewidth=1, antialiased=True)
  plt.axis('Equal')
  </code></pre>
  
  <p>which yields this plot:
  <a href="https://i.stack.imgur.com/G1sZR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/G1sZR.png" alt="enter image description here"></a></p>
  
  <p>I then have to manually zoom out to get proper axis limits.
  I have tried <code>plt.xlim(-100,100)</code>, but it doesn't seem to respond?
  Also, <code>the plt.axis('Equal')</code> doesn't seem to apply to the z-axis?</p>
  
  <p>The plot should look like this:</p>
  
  <p><a href="https://i.stack.imgur.com/oQf3c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oQf3c.png" alt="enter image description here"></a></p>