plt plot(xyplt show(this code is identical to the example aboveexcept for the first line and the last two lines the first line imports the plotting tools from the matplotlib packagewhich is an extensive library of functions for scientific visualization we will only use small subset of the capabilities of matplotlibmostly from the module pyplotto plot curves and create animations of curves that change over time the next few lines are from the example aboveand they simply create the two arrays and defining the points along the curve the last two lines carry out the actual plottingthe call plt plot( ,yfirst creates the plot of the curveand then plt show(displays the plot on the screen the reason for keeping these separate is to make it easy to plot multiple curves in single plotby calling plot multiple times followed by single call to show the resulting plot is shown in figure common mistake is to forget the plt show(calland the program will then simply end without displaying anything on the screen fig simple plot of function using matplotlib the plot produced by the code above is very simple and contains no titleaxis labelsor other information we can easily add such information in the plot by using tools from matplotlibimport matplotlib pyplot as plt import numpy as np def ( )import and plotting