arrays and plotting = = = - - - fig the gaussian bell function plotted for different values of let the animation run livewithout saving any files with this approachthe plots are simply drawn on the screen as they are createdthat isone plot is shown for each pass of the for loop the approach is simplebut has the disadvantage that we cannot pause the movie or change its speed loop over all data valuescreate one plot for each value and save it to fileand then combine all the image files into movie this approach enables us to actually create movie file that can be played using standard movie player software the drawback of this approach is that it requires separately installed software ( imagemagickto create the movie and view the animation use funcanimation object from matplotlib this approach uses slightly more advanced feature of matplotliband can be considered combination of the two approaches above the animation is played livebut it can also be stored in movie file the downside is that the creation of the movie file still relies on externally installed software that needs to be installed separately and integrated with matplotlib first alternativerunning the movie live as the plots are created this approach is the simplest of the three and requires very few tools that we have not already seen we simply use for loop to loop over the valuescompute new -valuesand update the plot for each iteration of the loop howeverwe need to be aware of couple of technical details in particularthe intuitive approach of simply including calls to plot( ,yfollowed by show(inside the for loop does not work calling show(will make the program stop after the first plot is drawnand it will not run further until we close the plotting window additionallyrecall that we used multiple calls to