一、Matplotlib
画二维图表的python库,实现数据可视化 , 帮助理解数据,方便选择更合适的分析方法
1、折线图
1.1引入matplotlib
import matplotlib.pyplot as plt
%matplotlib inline
plt.figure()
plt.plot([1, 0, 9], [4, 5, 6])
plt.show()
1.2折线图绘制与显示
# 展现上海一周的天气,比如从星期一到星期日的天气温度如下
# 1、创建画布
plt.figure(figsize=(20, 8), dpi=80)
# 2、绘制图像
plt.plot([1, 2, 3, 4, 5, 6, 7], [17, 17, 18, 15, 11, 11, 13])
# 保存

订阅专栏 解锁全文
8715

被折叠的 条评论
为什么被折叠?



