ropensci/plotly — pull request #95 by mkcor (2014-09-02 22:03:42+00:00)
Title: Convert geom_density into normalized histogram

ggplot2's geom_density estimates a probability density using Gaussian smoothing.

As of now we don't have this exact feature in Plotly, so for now let's map this visualization to a normalized histogram. See https://plot.ly/~mkcor/513

I hard-coded the binwidth to be `1/30` of the `x` range because that's what ggplot2 does with histograms.

Also, I thought I'd force `bargap` to be `0` whenever we are converting histograms; this is consistent with ggplot2 and has been brought up by many R users (`x` variable is continuous).

/cc @xsaintmleux @pedrodz