import matplotlib
as mpl
import matplotlib
.pyplot
as plt
import numpy
as np
mpl
.rcParams
["font.sans-serif"] = ["SimHei"]
mpl
.rcParams
["axes.unicode_minus"] = False
boxWeight
= np
.random
.randint
(0,10,1000)
x
= boxWeight
bins
= range(0,11,1)
plt
.hist
(x
,bins
=bins
,
color
="g",
histtype
="bar",
rwidth
=1,
alpha
=0.6)
plt
.xlabel
("箱子重量(KG)")
plt
.ylabel
("销售个数(个)")
plt
.show
()
转载请注明原文地址:https://blackberry.8miu.com/read-422.html