[英]How to make a polar plot given r, theta values?
我有一組(r,theta)值,我想做一個極坐標圖。 誰能告訴我(或將我指向資源)該怎么做? 例如,以下代碼表示一個圓圈。
r_array = []
theta_array = []
for i in range(360):
r_array.append(1)
theta_array.append(i)
#print (theta_array)
matplotlib似乎這樣做:
https://matplotlib.org/examples/pylab_examples/polar_demo.html
來自下面鏈接的簡短示例:
import matplotlib.pyplot as plt
r_array = []
theta_array = []
for i in range(360):
r_array.append(1)
theta_array.append(i)
ax = plt.subplot(111, projection='polar')
ax.plot(np.radians(theta_array), r_array)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.