gpt4 book ai didi

python - matplotlib 中没有网格的极坐标图

转载 作者:太空狗 更新时间:2023-10-29 18:21:31 27 4
gpt4 key购买 nike

有没有办法在 matplotlib 中关闭极坐标图的网格?我尝试了 matplotlib.pyplot.rgrids([], []),但它不起作用。

最佳答案

在您的 axes 实例中,调用 grid(False)

import matplotlib.pyplot as plt
import numpy as np

fig = plt.figure()
ax = fig.add_subplot(111, polar=True)
ax.grid(False)

r = np.arange(0,1,0.001)
theta = 2*2*np.pi*r

ax.plot(theta,r)
plt.show()

关于python - matplotlib 中没有网格的极坐标图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6385458/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com