I would like to know what is geom_density() exactly doing, so I justify the graph and if there is any way of extracting the function or points that generates for each of the curves being plotted.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Typing
get("compute_group", ggplot2::StatDensity)(or, formerly,get("calculate", ggplot2:::StatDensity)) will get you the algorithm used to calculate the density. (At root, it’s a call todensity()withkernel="gaussian"the default.)The points used in the plot are invisibly returned by
print.ggplot(), so you can access them like this: