suppose i have a data
_sample=np.array([1,2,3,4,5,6,7,8,9,10])
i am plotting the data using seaborn distplot which plots the data using KDE distribution
left image, i use the bin value as 10
- I am getting a plot which has a value 0.11 but it should be exactly 0.1 as value/n = 0.1
right image, i use the bin value [1,2,3,4,5,6,7,8,9,10]
- in the right image, i get most(90%) of the value at 0.10 but i have a few value having the y-axis 0.20. why is the right side of plot reaching to 0.20 when it all should have the value 0.10
please let me know what i am missing, i am not able to understand this
update: adding code
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
_fig,_ax=plt.subplots(1,2,figsize=(15,5))
_sample=np.array([1,2,3,4,5,6,7,8,9,10])
sns.distplot(_sample,bins=10,ax=_ax[0],axlabel='bins=10')
sns.distplot(_sample,bins=[1,2,3,4,5,6,7,8,9,10],ax=_ax[1],axlabel='bins=[1,2,3,4,5,6,7,8,9,10]')