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.
Deze oefening maakt deel uit van de cursus
Introduction to Data Visualization with Seaborn
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# Change to use relplot() instead of scatterplot()
sns.scatterplot(x="absences", y="G3",
data=student_data)
# Show plot
plt.show()