Scaling the fitted PDF of a log-normal distribution to the histrogram in python
问题 I have a log-normal distributed set a samples and want to perform a fit to it. Then I want to plot both the histogram of the samples and the fitted PDF into one plot, and I'd like to use the original scaling for the histogram. My question: How to directly scale the PDF such that it is visible in the histogram plot? Here is the code: import numpy as np import scipy.stats # generate log-normal distributed set of samples samples = np.random.lognormal( mean=1., sigma=.4, size=10000 ) # make a fit