Grafici multipli
Per l'ultimo esercizio traceremo un confronto dei canoni di mercato equo per appartamenti con 1 e 2 camere da letto.
Questo esercizio fa parte del corso
Visualizzazione dei dati intermedia con Seaborn
Istruzioni dell'esercizio
- Crea due oggetti assi,
ax0eax1. - Traccia
fmr_1suax0efmr_2suax1. - Mostra i grafici affiancati.
esercizio interattivo pratico
Prova questo esercizio completando questo codice di esempio.
# Create a plot with 1 row and 2 columns that share the y axis label
fig, (ax0, ax1) = plt.subplots(nrows=____, ncols=____, sharey=____)
# Plot the distribution of 1 bedroom apartments on ax0
sns.histplot(df['____'], ax=____)
____.set(xlabel="1 Bedroom Fair Market Rent", xlim=(100,1500))
# Plot the distribution of 2 bedroom apartments on ax1
sns.histplot(df['____'], ax=____)
____.set(xlabel="2 Bedroom Fair Market Rent", xlim=(100,1500))
# Display the plot
plt.show()