【发布时间】:2019-12-01 00:36:53
【问题描述】:
我已经编写了一个代码(在 python 中),它在圆周上每隔 10 度创建一个点:
rad = 75
originX = originY = 0
tenDegreePts = [[],[]]
for theta in range(0, 360, 10):
b = (np.cos(theta))*rad
a = (np.sin(theta))*rad
tenDegreePts[0].append(originX+b)
tenDegreePts[1].append(originY+a)
plt.plot(tenDegreePts[0],tenDegreePts[1],'o')
plt.ylim(-100,100)
plt.xlim(-100,100)
程序运行完美,但由于某种原因,圆形更像是椭圆形。此外,图表上的点之间的距离也不相等:
(在图片中您看不到轴,但它们在 x 和 y 上从 -100 变为 100)
【问题讨论】:
标签: python arrays matplotlib geometry scatter-plot