From the course: More Python Tips, Tricks, and Techniques for Data Science

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Multiple subplots

Multiple subplots

- [Instructor] Sometimes it is helpful to compare different plots of data side by side. To avail this Matplotlib has the concept of subplots, that is, grouping of smaller axes that can exist together within a single figure. These subplots might be in sets or grids of plots or other complicated layouts. So in this video, we'll explore different methods of creating subplots using matplotlib. So first off, we have imported the matplotlib and numpy libraries. And then we're going to look at very simple method of creating a subplot using the axes method. So we're going to simply create an inset axes inside another axes. So, first off I have the axis one, which is a simple axis. Now I'm going to specify another axes inside the axes one by specifying the X and Y coordinates 0.65, 0.65 then 0.2 and 0.2. So all these values. So this is creating an inset at the top right corner of axes one by setting the X and Y…

Contents