Limit the range of x in seaborn distplot KDE estimation

后端 未结 2 544
北荒
北荒 2021-02-08 13:01

Suppose we have an array with numbers between 0 and 1:

arr=np.array([ 0.        ,  0.        ,  0.        ,  0.        ,  0.6934264 ,
               0.        ,          


        
2条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-08 13:28

    Settins plt.xlim(0, 1) beforehand should help :

    plt.xlim(0, 1)
    sns.distplot(arr, hist=False)
    

提交回复
热议问题