एक से अधिक प्लॉट्स
अंतिम अभ्यास के लिए हम 1-बेडरूम और 2-बेडरूम अपार्टमेंट्स के फेयर मार्केट रेंट्स की तुलना प्लॉट करेंगे.
यह अभ्यास पाठ्यक्रम का हिस्सा है
इंटरमीडिएट Data Visualization with Seaborn
अभ्यास निर्देश
- दो axes ऑब्जेक्ट बनाएँ:
ax0औरax1. fmr_1कोax0पर औरfmr_2कोax1पर प्लॉट करें.- प्लॉट्स को साथ-साथ प्रदर्शित करें.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# 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()