I don't know if the stacked histogram is correct.
stackedhistogram.py
import matplotlib.pyplot as P
one = (100, 100, 500, 600, 800)
two = (100, 100, 500, 600, 800, 100, 100, 100, 100, 100)
three = (900, 100, 500, 600, 800, 500)
P.hist((one, two, three), histtype='barstacked', bins=5, label=('one', 'two', 'three'), color=('r', 'g', 'b'))
P.legend()
P.show()
Recommended Posts