我试图使用该matplotlib.hist()函数绘制直方图,但我不知道该怎么做.
我有一份清单
probability = [0.3602150537634409, 0.42028985507246375,
0.373117033603708, 0.36813186813186816, 0.32517482517482516,
0.4175257731958763, 0.41025641025641024, 0.39408866995073893,
0.4143222506393862, 0.34, 0.391025641025641, 0.3130841121495327,
0.35398230088495575]
Run Code Online (Sandbox Code Playgroud)
和名单(字符串)列表.
如何将概率作为每个条形的y值和名称作为x值?