Python Forum

Full Version: Matplotlib animation problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone!
Here's my problem: I'm working on graph path finding and I want to animate this search on matplotlib.
My code basically is so:

def anim():
	plt.ion()
	plt.plot(path)
	while condition:
		p=newpath(path)
		plt.plot(path)
but I would want to erase my last path before I show the new one. I don't find any solution using interactive mode. Help would be appreciated Big Grin Thank you a lot!
UP please