8
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

matplotlibでstacked histogram (積み上げヒストグラム) を書く

Last updated at Posted at 2013-07-12

積み上げヒストグラムが正しい訳なのかはわからない。

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()

stackedhistogram.png

参考

8
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?