倒入库,常用操作
import matplotlib.pyplot as plt
plt.show() # 展示图像
plt.savefig('test.png') # 保存图像
1,对list(float)进行直方图分柱统计
l = list(datas[12]) # list(float)
bins = np.arange(0.8, 1.6, 0.01) # 0.8到1.6,每个区间0.01
plt.hist(l, bins, color='fuchsia', alpha=0.5)
plt.xlabel('h')
plt.ylabel('count')
plt.xlim(0.8, 1.6)
plt.title('hist')
plt.show()