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

Bee swarm plot

iris के petal lengths का एक bee swarm plot बनाएँ. आपकी x-axis पर तीनों species हों, और y-axis पर petal lengths. डेटा वाला DataFrame आपके namespace में df नाम से मौजूद है.

संदर्भ के लिए, वीडियो में Justin द्वारा bee swarm plot बनाने का कोड नीचे दिया गया है:

_ = sns.swarmplot(x='state', y='dem_share', data=df_swing)
_ = plt.xlabel('state')
_ = plt.ylabel('percent of vote for Obama')
plt.show()

seaborn का उपयोग करके bee swarm plots कैसे बनाएँ, इस पर और जानकारी के लिए आप help(sns.swarmplot) का उपयोग कर सकते हैं.

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

Statistical Thinking in Python (Part 1)

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

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

  • df.head() का उपयोग करके DataFrame df देखें. इससे आप पहचान पाएँगे कि sns.swarmplot() कॉल में x और y कीवर्ड आर्ग्युमेंट्स के लिए किन कॉलम नामों को पास करना है.
  • Fisher iris डेटा सेट वाले DataFrame df से sns.swarmplot() का उपयोग कर bee swarm plot बनाएँ. x-axis पर तीनों species हों, और y-axis पर petal lengths हों.
  • axes को लेबल करें.
  • अपना प्लॉट दिखाएँ.

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

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

# Create bee swarm plot with Seaborn's default settings


# Label the axes


# Show the plot

कोड संपादित करें और चलाएँ