set_equal_aspect_and_square_limits()
Set the limits of an axes object to be square and equal aspect ratio (Using only ax.set_aspect('equal') will result in a plot that is not square).
ax.set_aspect('equal')
ax – The axes object to modify.