IniziaInizia gratis

Regression plot parameters

Seaborn's regression plot supports several parameters that can be used to configure the plots and drive more insight into the data.

For the next exercise, we can look at the relationship between tuition and the percent of students that receive Pell grants. A Pell grant is based on student financial need and subsidized by the US Government. In this data set, each University has some percentage of students that receive these grants. Since this data is continuous, using x_bins can be useful to break the percentages into categories in order to summarize and understand the data.

Questo esercizio fa parte del corso

Intermediate Data Visualization with Seaborn

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Plot a regression plot of Tuition and the Percentage of Pell Grants
sns.regplot(data=df,
            y='Tuition',
            x='____')

plt.show()
plt.clf()
Modifica ed esegui il codice