The line plot is used to represent a relationship between two continuous variables. It is typically used to represent the trend of a variable over time, such as GDP growth rate, inflation, interest rates, and stock prices over quarters and years. All the graphs we have seen in Chapter 1, Anatomy of Matplotlib are examples of a line plot.
Line plot
Getting ready
We will use the Google Stock Price data for plotting time series line plot. We have the data (date and daily closing price, separated by commas) in a .csv file without a header, so we will use the pandas library to read it and pass it on to the matplotlib.pyplot function to plot the graph.
Let's now import required libraries with the following code:
import matplotlib...