LoginSignup
5

More than 5 years have passed since last update.

matplotlibのヒストグラム用パラメータ抜粋

Last updated at Posted at 2015-12-06

ドキュメント読んでもなかなかわからないので、メモ

matplotlib.pyplot.hist(x, bins=10, range=None, normed=False, weights=None, cumulative=False, bottom=None, histtype='bar', align='mid', orientation='vertical', rwidth=None, log=False, color=None, label=None, stacked=False, hold=None, data=None, **kwargs)

よく使うパラメータの紹介

パラメータ名 内容
bins X軸の分割数(ブロック分けの数) int
range X軸のデータ表示範囲 int
normed 縮尺(1で最大値1の出現確率に、0でデータ数) boolean
histtype barは通常、barstackedは積み上げ、stepは外枠だけの階段状、stepfilledは階段を塗りつぶし str
color 色(blue,green,red,cyan,magenta,yellow,black,whiteが使える) str
alpha 透過率 float
label データラベル str

もちろん最後はドキュメントを参照
http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.hist

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
5