BaşlayınÜcretsiz Başlayın

Using a lmplot

The lmplot is used to plot scatter plots with regression lines on FacetGrid objects. The API is similar to catplot with the difference that the default behavior of lmplot is to plot regression lines.

For the first set of exercises, we will look at the Undergraduate population (UG) and compare it to the percentage of students receiving Pell Grants (PCTPELL).

For the second lmplot exercise, we can look at the relationships between Average SAT scores and Tuition across the different degree types and public vs. non-profit schools.

Bu egzersiz

Intermediate Data Visualization with Seaborn

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Create a FacetGrid varying by column and columns ordered with the degree_order variable
g = sns.FacetGrid(df, ___="Degree_Type", ____order=degree_ord)

# Map a scatter plot of Undergrad Population compared to PCTPELL
g.map(plt.___, 'UG', 'PCTPELL')

plt.show()
plt.clf()
Kodu Düzenle ve Çalıştır