1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Data Visualization with Seaborn

Exercise

Creating subplots with col and row

We've seen in prior exercises that students with more absences ("absences") tend to have lower final grades ("G3"). Does this relationship hold regardless of how much time students study each week?

To answer this, we'll look at the relationship between the number of absences that a student has in school and their final grade in the course, creating separate subplots based on each student's weekly study time ("study_time").

Seaborn has been imported as sns and matplotlib.pyplot has been imported as plt.

Instructions 1/3

undefined XP
  • 1

    Modify the code to use relplot() instead of scatterplot().

  • 2

    Modify the code to create one scatter plot for each level of the variable "study_time", arranged in columns.

  • 3

    Adapt your code to create one scatter plot for each level of a student's weekly study time, this time arranged in rows.