散点图的样式设置
在本练习中,您将使用 plt.scatter() 绘制视频中的父子身高数据。已为您预加载 father_son DataFrame。每个散点图都请将 father_son.fheight 作为 x 轴,将 father_son.sheight 作为 y 轴。
本练习是课程的一部分
在 Python 中可视化地理空间数据
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Import matplotlib.pyplot
import matplotlib.pyplot as ____
# Scatterplot 1 - father heights vs. son heights with darkred square markers
plt.scatter(father_son.fheight, father_son.sheight, ____ = 'darkred', ____ = 's')
# Show your plot
plt.____()