matplotlib を使用すると、2D ヒストグラムを作成できます
>>> import matplotlib.pyplot as plt
>>> freq = {1: 1000, 2: 980, 4: 560,40: 3, 41: 1, 43: 1}
>>> x = list(freq.keys())
>>> y = list(freq.values())
>>> plt.hist2d(x,y)
(array([[ 0., 0., 0., 0., 0., 1., 0., 0., 0., 2.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 3., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]), array([ 1. , 5.2, 9.4, 13.6, 17.8, 22. , 26.2, 30.4, 34.6,
38.8, 43. ]), array([ 1. , 100.9, 200.8, 300.7, 400.6, 500.5, 600.4,
700.3, 800.2, 900.1, 1000. ]), <matplotlib.image.AxesImage object at 0xb475012c>)
>>> plt.show()
