शुरू करेंमुफ़्त में शुरू करें

प्लॉट्स

अब आप एक फ़िगर बनाएँगे जिसमें आप origin के अनुसार प्रस्थान देरी और carrier के अनुसार औसत कुल देरी को visualize कर सकें.

यह अभ्यास पाठ्यक्रम का हिस्सा है

R उपयोगकर्ताओं के लिए Python

पाठ्यक्रम देखें

अभ्यास निर्देश

  • 2 पंक्तियों और 1 कॉलम (2 rows and 1 column) के साथ दो axes वाला एक फ़िगर बनाएँ.
  • seaborn और flights का उपयोग करके 'origin' और 'dep_delay' का क्रमशः x और y axes पर boxplot बनाएँ.
  • seaborn और tdel_car का उपयोग करके 'carrier' और 'total_delay' का क्रमशः x और y axes पर bar plot बनाएँ.
  • बॉक्सप्लॉट को यह लेबल दें: 'Originating airport and the departure delay'.

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

# Create a figure
fig, (ax1, ax2) = plt.subplots(____)

# Boxplot and barplot in the axes
sns.____(x=____, y=____, data=flights, ax=____)
sns.____(x=____, y=____, data=tdel_car, ax=____)

# Label axes
ax1.set_title(____)

# Use tight_layout() so the plots don't overlap
fig.tight_layout()
plt.show()
कोड संपादित करें और चलाएँ