From the course: Python for Data Visualization
Unlock this course with a free trial
Join today to access over 24,400 courses taught by industry experts.
Create subplots - Python Tutorial
From the course: Python for Data Visualization
Create subplots
- [Instructor] In this video, we'll learn how to create subplots using Matplotlib. It is often useful to compare different subsets of your data side by side. To demonstrate this, we're going to visualize images. We're going to have our figures appear inline in the notebook, so we're specifying inline. We're going to import pandas, NumPy, and Matplotlib. The next thing we have to do is you have to load our dataset, and our dataset is the digits dataset from scikit-learn. They have arranged into a CSV file for convenience. The dataset consists of pixel intensity values for 1,797 images that are eight-by-eight pixels. This means that the dataset has 64 total values per image, and each image is labeled with a number from zero to nine. We're going to load our dataset into panda's data frame by using the read_csv method. With any dataset, it's always good to check the first couple rows to make sure everything loaded properly.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.