有没有办法在Matplotlib的极坐标图中关闭网格线? 我尝试过
matplotlib.pyplot.rgrids([], [])
,但它不起作用。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()
ax.set_xticklabels([])
和ax.set_yticklabels([])
即可。 - Stephen Terryax.axis("off")
。 - Vito Gentile