updating figures

Hello, I have a simple script that creates a few plots. Although
the script is in a while loop and creates plots endlessly, what I want is to
have one plot that is updated. How can I tell my script to update a figure
rather than create a new one? Thanks.

I’m using the WX backend. Thanks.