9951 explained code solutions for 126 technologies

python-matplotlibHow to make equal axes

Using set_aspect() can help make sure axes are equal:

import matplotlib.pyplot as plt
ax = plt.gca()
plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities


plot specified data


returns current axes object


make chart aspect ratio is 1:1


render chart in a separate window