1 统计直方图
统计直方图类似柱状图,但是与柱状图相比有不同含义。...代码如下:
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib as mpl
mpl.rcParams['font.sans-serif...轴,设置x轴刻度为空
ax1 = fig.add_subplot(321, sharex = ax5)
ax1.hist(x, bins = 20, edgecolor = 'k')
ax1.set_xticks...323, sharex = ax5)
ax3.hist(x, bins = 20, range = (0, 300), density = True, edgecolor = 'k')
ax3.set_xticks...= (0, 300), density = True)
ax4.plot(bins2[:-1], n2, linestyle = '--', lw = 3, color = 'r')
ax4.set_xticks