我正在尝试在matplotlib中创建fourfold display:
但无法得到极轴的逻辑。到目前为止,我一直在努力:
import numpy as np
import matplotlib.pyplot as plt
# radius of each bar
radii = [10, 15, 20, 25]
# Value - width
width = np.pi/ 2
# angle of each bar
theta = [0,90,180,270]
ax = plt.subplot(111, polar=True)
bars = ax.bar(theta, radii, width=width)
plt.show()
我不知道我错过了什么,但我只想四个“平等”的领域,相互接触。我不能去工作的是
如何“控制”角度?我的意思是四张“幻灯片”都在[0,90], [90,180], [180, 270], [270, 360]
中。
我不明白“宽度”是什么意思。
万一有人对这里感兴趣,我就想到了
要使用本文中的Berkeley许可的例子,首先需要使用iterative proportional fitting标准化这些值(使边距相等)
然后策划
^{pr2}$使用
theta
应为弧度,而不是度。在如果只是稍微调整一下代码:
你会得到你期望的结果:
另一方面,对于您正在制作的精确绘图,在具有中心脊椎的矩形图上使用4
Wedge
可能更有意义。在相关问题 更多 >
编程相关推荐