I really like the polar plot of matplotlib and would love to keep working with it (since my data points are given in polar coordinates anyway and my environment is circular).
However, in the plot, I would like to add circles of given radii at specific points.
Usually, I would do:
ax = plt.subplot(111)
ax.scatter(data)
circle = plt.Circle((0,0), 0.5)
ax.add_artist(circle)
plt.show()
However, in polar coordinates, I cannot use circle, since it assumes rectangular coordinates.
Ideas I have come up with are: generating an array of points with constant radial coordinate and an angular coordinate in [0, 2PI] or completely switching to rectangular coordinates. Both solutions are not really satisfactory - can one do any better with matplotlib?
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…