我想在python的网格上绘制一个圆。我只需要python来显示带有平方单元格的网格。我编写了以下代码,但它显示了具有非平方单元格的网格。
谁能告诉我如何使网格单元平方吗?
import numpy as np
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')