Probability distribution function in Python
问题 I know how to create an histogram in Python, but I would like that it is the probability density distribution. Let's start with my example. I have an array d , with a size of 500000 elements. With the following code I am building a simple histogram telling me how many elements of my array d are between every bin. max_val=log10(max(d)) min_val=log10(min(d)) logspace = np.logspace(min_val, max_val, 50) H=hist(select,bins=logspace,histtype='step') The problem is that this plot is not what I want