import numpy.random as npr
size=1000
rn1=npr.standard_normal(size)
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_palette('muted')
fig,((ax1,ax2),(ax3,ax4)) = plt.subplots(2,2,figsize=(10,10))
ax1.hist(rn1,bins=25)
ax1.set_title('fig1')#matplotlib的作图效果
sns.distplot(rn1, bins=25, kde=False, ax=ax2)#seaborn的distplot作图效果
ax2.set_title('fig2')
sns.distplot(rn1,bins=25, kde= True, ax= ax3)#增添核密度曲线的效果
ax3.set_title('fig3')
sns.distplot(rn1,bins=25, kde=True, rug=True, ax=ax4)#添加边际毛毯图
ax4.set_title('fig4')