EDA of beak length and depth
The beak length data are stored as bl_1975 and bl_2012, again with units of millimeters (mm). You still have the beak depth data stored in bd_1975 and bd_2012. Make scatter plots of beak depth (y-axis) versus beak length (x-axis) for the 1975 and 2012 specimens.
This exercise is part of the course
Statistical Thinking in Python (Part 2)
Exercise instructions
- Make a scatter plot of the 1975 data. Use the
color='blue'keyword argument. Also use analpha=0.5keyword argument to have transparency in case data points overlap. - Do the same for the 2012 data, but use the
color='red'keyword argument. - Add a legend and label the axes.
- Show your plot.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Make scatter plot of 1975 data
_ = ____(____, ____, marker='.',
linestyle='None', ____, ____)
# Make scatter plot of 2012 data
_ = ____(____, ____, marker='.',
linestyle='None', ____, ____)
# Label axes and make legend
_ = plt.____('beak length (mm)')
_ = plt.____('beak depth (mm)')
_ = plt.____(('1975', '2012'), loc='upper left')
# Show the plot
____