直方图
matplotlib
plt.hist(x,bins,range,normed,weight,cumulative,bottom,histtype,align,
orientation,rwidth,log,color,label,stacked)
bins:条形个数
range:上下边界
normed:频数转为频率
cumulative:计数累计
bottom:基准线
histtype:bar,barstacked,step,stepfilled
align:边界值对齐方式,mid,left,right
orientation:摆放方向
rwidth:条形宽度
stacked:堆叠
直方图加核密度图
Pandas
ti.dropna(subset=['Age'],inplace=True)
any(ti.Age.isnull())
ti.Age.plot(kind='hist',bins=20,color='red',edgecolor='black',normed=True,
label='直方图')
ti.Age.plot(kind='kde',color='red',label='核密度')
plt.show()