Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

How to plot kernel density plot on a given histogram plot?

$
0
0

@sid100158 wrote:

I am currently trying to plot a density plot from a given histogram plot.
Density plot- Is formed by computing an estimate of a continuous probability distribution that might have generated from the observed data.
Do I want to know how this can achieve in python?

comp1 = np.random.normal(0, 1, size=200) # N(0, 1)
comp2 = np.random.normal(10, 2, size=200) # N(10, 4)
values = Series(np.concatenate([comp1, comp2]))
values.hist(bins=100, alpha=0.3, color='k', normed=True)
values.plot(kind='kde', style='k--')

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles