[英]How do I generate a scatter polar plot, from this function, Using the columns as my plot coordinates?
[英]How do I plot the position of a body in orbit using polar coordinates in python
试图通过求解开普勒定律来求解椭圆运动物体的plot position。 I have a function for r (distance between focal point and body) and Theta (Angle between line connecting focal and body and horizontal) and when plotting (r, Theta) using plt.polar(r, Th) I get a messy plot (如下所示) plt.polar(r, Th)和绘图 plt.polar(Th, r) plt.polar(Th, r)给了我一个几乎正确的椭圆,但是当我改变偏心率时,它给出了一个非椭圆的形状。 关于我如何 plot position 的任何想法?[plt.polar(r, Th)]
不幸的是,我没有看到 plot 或图像。 plt.polar()
的文档特别差,因为它没有解释您传入的值应该是什么。 I would suggest using Matplotlib's object oriented API such as in this example https://matplotlib.org/stable/gallery/pie_and_polar_charts/polar_demo.html .
请注意,角度值需要以弧度为单位,而不是度数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.