Is there a way to turn of the grid for polar plots in matplotlib? I tried matplotlib.pyplot.rgrids([], []), but it doesn't work.
1 Answer
From your axes instance, call 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()
2 Comments
Stephen Terry
If you want to remove the labels, you just have to call
ax.set_xticklabels([]) and ax.set_yticklabels([]).Vito Gentile
and if you want to remove the outline border, use
ax.axis("off")