IniziaInizia gratis

Plot a histogram

The displot() function will return a histogram by default. The displot() can also create a KDE or rug plot which are useful ways to look at the data. Seaborn can also combine these plots so you can perform more meaningful analysis.

Questo esercizio fa parte del corso

Intermediate Data Visualization with Seaborn

Visualizza il corso

Istruzioni dell'esercizio

  • Create a displot for the data.
  • Explicitly pass in the number 20 for the number of bins in the histogram.
  • Display the plot using plt.show().

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Create a displot
sns.displot(df['Award_Amount'],
             bins=____)

# Display the plot
plt.show()
Modifica ed esegui il codice