
The FuncAnimation class will be used to create the animated plot. The script to build the animated line plot starts almost the same way as our simple line plot, the difference is that we need to import Matplotlib's FuncAnimation class from the matplotlib.animation library. We will set a lower limit of 1 and an upper limit of 9. Python's randint() function accepts a lower limit and upper limit. The data for the animated line plot will be generated randomly using Python's randint() function from the random module in the Standard Library. We are going to build upon that static line plot and create an animated line plot. The previous plot we just built was a static line plot. Next, we'll build an animated line plot with Matplotlib. set_title ( 'Temperature in Portland, OR over 7 days' ) # save and show the plot fig. subplots () # plot the data and customize ax. # static_plot.py # import necessary packages import matplotlib.pyplot as plt # data data_lst = # create the figure and axis objects fig, ax = plt. You can create a new virtual environment by opening the Anaconda Prompt and typing: I recommend undergraduate engineers use the Anaconda distribution of Python which comes with the Anaconda Prompt. Real Python has a good introduction to virtual environments and why to use them. To start the coding process, we will set up a new Python virtual environment. Now that the pre-requisites are out of the way, let's start coding! Set up a Python virtual environment

You know how to run a Python program (execute a.I will be using Visual Studio Code (also called VS Code) in this post, but any regular code editor will work. You know how to create a text file in an editor or an IDE (integrated development environment) such as Visual Studio Code, P圜harm, Sublime Text, vim, emacs, etc.You have a general idea of what Python packages are and have installed a Python package before using conda or pip.You know how to open the Anaconda Prompt on Windows10 or know how to open a terminal on MacOS or Linux.Python version 3.7 or 3.8 are more up-to-date and recommended.

You are running a version of Python 3.6 or above.I recommend installing the Anaconda Distribution of Python. Python needs to be installed on your computer.To follow along with this tutorial, a couple of pre-requisites need to be in place:

Build a live plot using data from a sensor.Build a live plot using data from the web.
