I want to plot a circle on a grid in python. I just need python to show the grid with squared cells. I wrote the following code, but it shows the grid with NON-squared cells.
Can anyone tell me how to make the grid cells be squared ?
import matplotlib.pyplot as plt
import math
p=8
R=0.484*p
t=np.linspace(0, 2*np.pi)
x=R*np.cos(t)
y=R*np.sin(t)
plt.axis("equal")
plt.grid(True, which='both', axis='both')
plt.plot(x,y)
plt.show()