From the course: Python Functions for Data Science

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Matplotlib line plots

Matplotlib line plots - Python Tutorial

From the course: Python Functions for Data Science

Start my 1-month free trial

Matplotlib line plots

- [Instructor] The matplotlib library, is another important toolbox for data scientists. It's used to create static, animated, and interactive data visualizations in Python. matplotlib's pyplot submodule is a collection of functions that allow you to plot data and make changes to plots. In this video, I'll be showing you how to create line plots using matplotlib. First, I'll need to import the libraries and modules I'll be using in this notebook. I'll import the pandas library and give it the alias pd, and I'll import the module matplotlib.py plot and give it the alias plt. Let's say that I have a pandas data frame containing temperatures in Fahrenheit for seven consecutive days in Santa Barbara, California as shown here. And let's say that I have another pandas data frame, containing temperatures in Fahrenheit for seven consecutive days in Memphis, Tennessee, as shown here. Now say I want to create a line plot of…

Contents