Seaborn:拟合柱状图分布曲线

柱状图在做数据分析中使用很多 ,有时我们可以将柱状图的分布拟合成曲线,看看是否服从正态分布。

import seaborn as sns 
import matplotlib as mpl 
sns.set_palette("hls") 
mpl.rc("figure", figsize=(6,4)) 
#将数据划分成30个状态图,并拟合分布曲线
sns.distplot(df['DXMASCORE'],bins=30,kde_kws={"color":"seagreen", "lw":3 }, hist_kws={ "color": "b" }) 
plot.show()

数据问题,所以拟合出来的图形有点丑。。。 

Seaborn:拟合柱状图分布曲线_第1张图片

你可能感兴趣的:(机器学习)