Using Matplotlib, I want to draw six plots side-by-side. However, I want each plot to have an aspect ratio of 1.
If I run the following:
import matplotlib.pyplot as plt
fig = plt.figure()
for n in range(1, 6):
fig.add_subplot(1, 6, n)
plt.axis([0, 4, 0, 4])
plt.show()
Then it shows the six plots "squashed" along the x-axis. This occurs even though I have set the x-axis and the y-axis to be the same length.
How can I make all the plots have an aspect ratio of 1?

figaspectso as to have control over the figure aspect ratio to start with.import matplotlib.pyplot as plt fig = plt.figure() for n in range(1, 6): a=fig.add_subplot(1, 6, n) a.set_aspect(1) plt.axis([0, 4, 0, 4])axis('equal').