I would like to add a density plot to my histogram diagram. I know something about pdf function but I've got confused and other similar questions were not helpful.
from scipy.stats import *
from numpy import*
from matplotlib.pyplot import*
from random import*
nums = []
N = 100
for i in range(N):
a = randint(0,9)
nums.append(a)
bars= [0,1,2,3,4,5,6,7,8,9]
alpha, loc, beta=5, 100, 22
hist(nums,normed= True,bins = bars)
show()
I'm looking for something like this
kdeplot
function. – Twice