Today I Learned
matplotlib x y limit and aspect ratio
Use
plt.xlim(-1,1)
plt.gca().set_aspect('equal', adjustable='box')
if
plt.xlim(-1,1)
plt.axes().set_aspect('equal', 'datalim')
doesn’t work.
Use
plt.xlim(-1,1)
plt.gca().set_aspect('equal', adjustable='box')
if
plt.xlim(-1,1)
plt.axes().set_aspect('equal', 'datalim')
doesn’t work.