上传者: 38526823
|
上传时间: 2022-09-19 10:42:15
|
文件大小: 148KB
|
文件类型: PDF
首先我们先用随机函数编造一个包含1000个数值的一维numpy数组,如下:
// An highlighted block
rng = np.random.RandomState(seed=12345)
samples = stats.norm.rvs(size=1000, random_state=rng)
接下来我们将使用各种方法画出以上数据的累积分布图
1、matplotlib.pyplot.hist()
def hist(self, x, bins=None, range=None, density=None, weights=None,
cumulative=F