title: How do I set the aspect ratio for a plot in Python with Spyder?
body: <p>I'm brand new to Python, I just switched from Matlab. The distro is Anaconda 2.1.0 and I'm using the Spyder IDE that came with it. </p>
  
  <p>I'm trying to make a scatter plot with equal ratios on the x and y axes, so that this code prints a square figure with the vertices of a regular hexagon plotted inside.</p>
  
  <pre><code>import numpy
  import cmath
  import matplotlib
  
  coeff = [1,0,0,0,0,0,-1]
  x = numpy.roots(coeff)
  
  zeroplot = plot(real(x),imag(x), 'ro')
  plt.gca(aspect='equal')
  plt.show()
  </code></pre>
  
  <p>But <code>plt.gca(aspect='equal')</code> returns a blank figure with axes <code>[0,1,0,1]</code>, and <code>plt.show()</code> returns nothing.</p>