首页 > 解决方案 > 0-90 度之间角度的极坐标图

问题描述

我正在尝试在 python 中做一个极坐标图,它的角度在 0-90 度之间。运行我的代码时,这些点遍布四个象限。这是一段描述我想说的话的代码。cl 取 0-90 度的角度。

angles = 2*np.pi*np.random.randint(0,864000,225)/864
fig, ax1 = plt.subplots(figsize=(6, 6),
subplot_kw=dict(polar=True))
ax1.set_xticks(np.pi/180. * np.linspace(0,  360, 4, endpoint=False))
ax1.set_theta_zero_location('N')
ax1.set_theta_direction(-1)
ax1.scatter(angles,cl)
ax1.grid(True)

标签: pythonmatplotlib

解决方案


推荐阅读