蟒蛇色彩极性情节与彩色圆圈

时间:2017-05-11 20:34:21

标签: python colors polar-coordinates

我试图在r和theta的极坐标图中绘制颜色的数值。我是用matplotlib中的极坐标绘制的,但我想在圆周处插入一个染色体圆或至少颜色矩形,以便更容易读取颜色。我举了一个例子(见下图)enter image description here

我一直在尝试使用下面的代码,但我对结果并不满意,是否有其他方法可以插入这样的彩色圆圈或矩形?谢谢 !     r = np.arange(1,11,1)     theta = np.arange(1,20,2)

fig, ax = plt.subplots(nrows=1, ncols=1, figsize=(10,10))
ax = plt.subplot(projection='polar')

rect1 = matplotlib.patches.Rectangle((85.48,60), -50, 10, color='blue')
rect1 = matplotlib.patches.Rectangle((85.48,60), -50, 10, color='blue')

ax.plot(theta,r)
ax.add_patch(rect1)
ax.set_rmax(70)
plt.show()

0 个答案:

没有答案