Overlapping polar countourf and scatter plot

走远了吗. 提交于 2019-12-06 12:03:48

Ops, sorry the answer occurred to me two minutes after a asked my question. I just realized that adding a scatter plot somehow changes the axes limits. Forcing the axes to the desired interval fixes the problem.

fig, ax = plt.subplots(subplot_kw=dict(projection='polar'))
ax.contourf(theta, r, values)
ax.scatter([np.radians(140)], [40], s=20, c='White')
ax.set_rmax(60)
ax.set_rmin(0)

I thought I could leave the question on anyways, it still can be helpful to other users.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!