# NOT RUN {
library(ggplot2)
library(plotly)
# create the histogram using `ggplotly_histogram()`
p <- ggplot() + ggplotly_histogram(data = ToothGrowth, mapping = aes(len))+
xlab("len")
# convert `ggplot` object to `plotly` object
ggplotly(p, tooltip = c("Range", "count", "density"))
# }
Run the code above in your browser using DataLab