[R] Plot histogram and lognormal fit on the same time
    Eric Leroy 
    |eroy @end|ng |rom |cmpe@cnr@@|r
       
    Thu Jan 21 12:54:14 CET 2021
    
    
  
Hi,
I would like to plot the histogram of data and fit it with a lognormal 
distribution.
The ideal, would be to superimpose the fit on the histogram and write 
the results of the fit on the figure.
Right now, I was able to plot the histogram and fit the density with a 
lognormal, but I can't combine all together.
Here is the code I wrote :
histdata <- hist(dataframe$data)
library(MASS)
fitdistr(histdata$density, "lognormal")
Can you help me ?
Best regards,
-- 
*Eric Leroy*
/Responsable de la plateforme microscopie électronique/
/Correspondant Sécurité des Systèmes Informatiques de l'ICMPE/
ICMPE - UMR 7182 - CNRS - UPEC
2/8, rue Henri Dunant
94320 Thiais
Tél : 01.49.78.12.09
Fax : 01.49.78.12.03
courriel : leroy using icmpe.cnrs.fr <mailto:leroy using icmpe.cnrs.fr>
Page Web : : http://www.icmpe.cnrs.fr <http://www.icmpe.cnrs.fr>
    
    
More information about the R-help
mailing list