As one can see from the above picture, 1 unit on x-asis of the graph is different from that on y-axis (in terms of length). (So you see rectangle instead of square.)
I would like to ask how can I make it the same? Thanks in advance.
You can force matplotlib to use the same scaling for both axes by adding the following to your plot:
plt.axis('equal')
More information can be found here: axis_equal_demo.py