[TOC]
# plot折線圖
~~~
%matplotlib inline
import pandas as pd
import numpy as np
s = pd.Series(np.random.randn(10), index=np.arange(0, 100, 10))
s.plot()
~~~

~~~
df = pd.DataFrame(np.random.randn(10, 4).cumsum(0), index=np.arange(0, 100, 10), columns=['A', 'B', 'C', 'D'])
df.plot()
~~~
輸出

# 子圖
~~~
import matplotlib.pyplot as plt
# 子圖是2行1列的
fig,axes = plt.subplots(2, 1)
data = pd.Series(np.random.rand(16), index = list('abcdefghijkmlnop'))
# bar豎著畫柱形圖,barh橫著畫
data.plot(ax = axes[0], kind='bar')
data.plot(ax = axes[1], kind='barh')
~~~

# 柱狀圖
~~~
df = pd.DataFrame(np.random.rand(6,4),
index=['one', 'two', 'three', 'four', 'five', 'six'],
columns = pd.Index(['A', 'B', 'C', 'D'], name='Genus'))
df.plot(kind='bar')
~~~

# 直方圖
查看某個屬性的直方圖
~~~
# bins是50個小區域,hist是直方圖
df.A.plot(kind='hist', bins=50)
~~~

# 散點圖
~~~
df.plot.scatter('A', 'B')
~~~
