Python Forum
Matplotlib animation problem - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/Forum-Python-Coding)
+--- Forum: General Coding Help (https://python-forum.io/Forum-General-Coding-Help)
+--- Thread: Matplotlib animation problem (/Thread-Matplotlib-animation-problem)



Matplotlib animation problem - Potatoez - May-20-2019

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!


RE: Matplotlib animation problem - Potatoez - May-21-2019

UP please