使用 Seaborn 画一张图,满足:

数据 :import seaborn as sns
import matplotlib.pyplot as plt

study_hours = [
    1.5, 2, 2.5, 3, 4, 2, 1, 3.5, 4, 5,
    2.5, 3, 3.5, 4, 1.5, 2, 2.5, 3,
    4.5, 5, 6, 3, 2, 1, 4, 3.5,
    2.5, 3, 4, 5
]作业要求 :使用 Seaborn 画一张图,满足:

使用 sns.histplot

显示 直方图

同时显示 KDE 曲线

标题:30天学习时长分布(Seaborn)

X 轴:学习时长(小时)

Y 轴:频数

图像能正常显示

实操列表

课程分类

百战未来微信公众号

百战未来微信小程序

©2014-2026百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637