有没有办法可以在 r=0 或 r=outer_edge 的位置用“凹槽”装饰我的极坐标/径向图?下面是一个例子。“缺口”是指原点和图边缘的红线和蓝线。
下面的代码可用于生成极坐标图。
import numpy as np
import matplotlib.pyplot as plt
data = [-121,87,118,87,109,-139,-112,115,153,-109,-106,-92,75,-98,103,-89,
152,114,77,-109,77,107,-77,106,-158,-71,-166,97,144,-166,138,39,130,
-71,-76,-82,128,74,-47,94,-119,130,76,-86,-85,108,-78,-96,-113,82,
127,-168,72,83,-61,-99,-83,-130,-69,43]
r = np.arange(0, len(data))
ax = plt.subplot(111,polar=True)
ax.scatter(data,r)
plt.show()