I've become very fond of Jupyter as a front-end to my scientific libraries. Before Jupyter, I would primarily use MATLAB for algorithm development and testing, for which MATLAB's plotting tools were useful for visualising features of interest during an algorithm's runtime.
Updating a matplotlib figure within Jupyter was not an obvious task for me. I made a few attempts to get it working with no success, but eventually pieced together a working example from various posts I found during my searches.
I hope you find the below examples useful. The first one clears the axes before plotting, the second one doesn't.
You will need to download the notebook (working_example.ipynb) and run it on your installation of Jupyter. Alternatively, you could run it from a Kaggle Kernel!