ax.grid()
ax.set_xlim(0, 30)
ax.set_ylim(0, 30)
ax.set_aspect(1)
plt.setp(ax.xaxis.get_gridlines(), clip_path=circle)
plt.setp(ax.yaxis.get_gridlines(), clip_path=circle)
plt.show()
Python Plot: How to remove grid lines not within the circle?