Once we start plotting more than one line of data points, things might become a little bit unclear. By adding a legend to our graphs, we can identify data, and tell what it actually means.
We do not have to choose different colors to represent the different data. Matplotlib automatically assigns a different color to each line of the data points.
All we have to do is create the chart and add a legend to it.