在matplotlib中绘制无网格极坐标图
有没有办法在matplotlib中关闭极坐标图的网格线?我试过用 matplotlib.pyplot.rgrids([], [])
,但是没效果。
1 个回答
23
从你的 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()