[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')
~~~
