Customizing point plots
Let's continue to look at data from students in secondary school, this time using a point plot to answer the question: does the quality of the student's family relationship influence the number of absences the student has in school? Here, we'll use the "famrel"
variable, which describes the quality of a student's family relationship from 1 (very bad) to 5 (very good).
As a reminder, to create a point plot, use the catplot()
function and specify the name of the categorical variable to put on the x-axis (x=____
), the name of the quantitative variable to summarize on the y-axis (y=____
), the pandas DataFrame to use (data=____
), and the type of categorical plot (kind="point"
).
We've already imported Seaborn as sns
and matplotlib.pyplot
as plt
.
This exercise is part of the course
Introduction to Data Visualization with Seaborn
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Create a point plot of family relationship vs. absences
# Show plot
plt.show()