अतिरिक्त प्लॉट कस्टमाइज़ेशन
matplotlib API एक्सिस लेबल करना, टाइटल जोड़ना, और लिमिट सेट करना जैसी कई आम कस्टमाइज़ेशन सपोर्ट करता है. आइए एक और कस्टमाइज़ेशन अभ्यास पूरा करें.
यह अभ्यास पाठ्यक्रम का हिस्सा है
इंटरमीडिएट Data Visualization with Seaborn
अभ्यास निर्देश
fmr_1कॉलम काhistplotबनाएँ.- x-axis लेबल को "1 Bedroom Fair Market Rent" में बदलें.
- x-axis की लिमिट 100 और 1500 के बीच सेट करें.
- प्लॉट में
"US Rent"जैसा एक वर्णनात्मक टाइटल जोड़ें.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Create a figure and axes
fig, ____ = plt.subplots()
# Plot the distribution of 1 bedroom rents
sns.____(df['fmr_1'], ax=____)
# Modify the properties of the plot
ax.set(xlabel="1 Bedroom Fair Market Rent",
xlim=(____,____),
____="US Rent")
# Display the plot
plt.show()