Birden çok grafik
Son egzersizde, 1 yatak odalı ve 2 yatak odalı daireler için adil piyasa kiralarının karşılaştırmasını çizeceğiz.
Bu egzersiz, kursun bir parçasıdır
Seaborn ile Orta Düzey Veri Görselleştirme
Egzersiz talimatları
- İki eksen nesnesi oluştur:
ax0veax1. fmr_1değerleriniax0üzerinde vefmr_2değerleriniax1üzerinde çiz.- Grafikleri yan yana göster.
Uygulamalı etkileşimli egzersiz
Bu egzersizi bu örnek kodu tamamlayarak deneyin.
# 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()