Heritability की EDA
एरे bd_parent_scandens में प्रजाति G. scandens के दो अभिभावकों की औसत चोंच गहराई (mm में) है। एरे bd_offspring_scandens में उन्हीं अभिभावकों की संतान की औसत चोंच गहराई है। एरे bd_parent_fortis और bd_offspring_fortis में G. fortis पक्षियों के मापों की वही जानकारी है.
दोनों प्रजातियों के लिए औसत अभिभावक चोंच गहराई (x-axis) के विरुद्ध औसत संतान चोंच गहराई (y-axis) का एक स्कैटर प्लॉट बनाइए। ओवरलैपिंग पॉइंट्स को बेहतर देखने के लिए alpha=0.5 keyword argument का उपयोग करें.
यह अभ्यास पाठ्यक्रम का हिस्सा है
Statistical Thinking in Python (Part 2)
अभ्यास निर्देश
- दोनों प्रजातियों के लिए स्कैटर प्लॉट बनाइए। G. fortis का डेटा नीले रंग में और G. scandens का डेटा लाल रंग में दिखाइए.
- axis लेबल सेट कीजिए, legend जोड़िए, और प्लॉट दिखाइए.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Make scatter plots
_ = ____(____, ____,
marker=____, linestyle=____, color=____, alpha=____)
_ = plt.plot(bd_parent_scandens, ____,
marker=____, linestyle=____, color=____, alpha=____)
# Label axes
_ = plt.____('parental beak depth (mm)')
_ = plt.____('offspring beak depth (mm)')
# Add legend
_ = plt.____(('G. fortis', 'G. scandens'), loc='lower right')
# Show plot
plt.show()