Skip to content

shahinrostami/update_plot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Jupyter: updating matplotlib figure from within a loop

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!

About

Working example of updating a matplotlib plot from within a loop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published