摘要: 一、特点 数据必须是原始数据不能经过处理,数据连续型,显示一组或多组分布数据 histogram 直方图 normed 定额 二、核心 hist(x, bins=None, normed=None) # x是需要统计的数据,类型:数组 # bins是组数, 组数 = (max(数组)- min(数组 阅读全文
posted @ 2019-11-27 23:35 市丸银 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 一、特点 离散数据,数据之间没有直接的关系 二、分类 1、垂直条形图 bar(x, height, width=0.8) # x 为x轴 # height 为y轴 # width 为 条形图的宽度 例子 from matplotlib import pyplot as plt from matplo 阅读全文
posted @ 2019-11-27 23:32 市丸银 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 一、特点 离散的数据,查看分布规律,走向趋势 二、使用 1、核心 plt.scatter(x, y) # x为x轴的数据,可迭代对象,必须是数字 # y为y轴的数据,可迭代对象,必须是数字 # x和y必须一一对应 2、例子 注意:在设置x轴或y轴刻度时,ticks和labes的值要一一对应 from 阅读全文
posted @ 2019-11-27 22:49 市丸银 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 注意:绘图和设置x轴的刻度是相互独立的不相关的 官网:https://matplotlib.org/ 案例:https://matplotlib.org/3.1.1/gallery/index.html 一、安装 conda install matplotlib 二、作用 1.将数据可疏忽,更直观的 阅读全文
posted @ 2019-11-27 16:08 市丸银 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 1、基本要点 # 导入模块 from matplotlib import pyplot as plt # x轴数据 x = range(2, 26, 2) # y轴数据 y = [15, 13, 14.5, 17, 20, 25, 26, 26, 27, 22, 18, 15] # 绘图 plt.p 阅读全文
posted @ 2019-11-27 11:23 市丸银 阅读(182) 评论(0) 推荐(0) 编辑