自定义条形图
在本练习中,您将探索一份来自中学学生的数据。变量 "study_time" 记录每位学生每周学习时间的自我报告,类别包括:"<2 hours"、"2 to 5 hours"、"5 to 10 hours" 或 ">10 hours"。学习时间报告更长的学生,期末成绩是否更好?让我们用条形图比较各个类别学生的平均期末成绩。
已将 Seaborn 导入为 sns,并将 matplotlib.pyplot 导入为 plt。
本练习是课程的一部分
Seaborn 数据可视化入门
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Create bar plot of average final grade in each study category
# Show plot
plt.show()