【发布时间】:2011-06-17 12:02:02
【问题描述】:
有没有办法在 matplotlib 中打开极坐标图的网格?我试过matplotlib.pyplot.rgrids([], []),但它不起作用。
【问题讨论】:
标签: python matplotlib
有没有办法在 matplotlib 中打开极坐标图的网格?我试过matplotlib.pyplot.rgrids([], []),但它不起作用。
【问题讨论】:
标签: python matplotlib
从您的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([])。
ax.axis("off")