I'm using a loop to generate vector fields on a basemap as such:
for i in range(365):
barbs = m.quiver(x, y, u[i, :], v[i, :], scale = 100)
plt.draw()
barbs.remove()
The program takes drastically more memory with every loop. Is there a way to get around this? Such as deleting barbs entirely at the end of each loop?