R ユーザーのための Python
Daniel Chen
Instructor
plot() メソッドplot に kind 引数を渡すkind の種類:line : 折れ線グラフ(デフォルト)bar : 縦棒グラフbarh : 横棒グラフhist : ヒストグラムbox : 箱ひげ図kde : カーネル密度推定プロットdensity : 'kde' と同じarea : 面積グラフpie : 円グラフscatter : 散布図hexbin : 六角形ビンプロットimport matplotlib.pyplot as plt
iris['sepal_length'].plot(kind='hist')
plt.show()

cts = iris['species'].value_counts()
cts.plot(kind='bar')
plt.show()

iris.plot(kind='scatter', x='Sepal.Length', y='Sepal.Width')
plt.show()

iris.plot(kind='box')
plt.show()

iris.boxplot(by='Species', column='Sepal.Length')
plt.show()

R ユーザーのための Python