r - ggplotly with dynamically adjusted number of bins -


i want know if number of bins can dynamically updated when using ggplotly.

here sample code:

library(ggplot2) library(plotly)  x <- data.frame(a = 1:100, b = sample(rep(1:5,20))) test <- ggplot(x, aes(a, fill = as.factor(b))) + geom_histogram(bins = 20) ggplotly(test) 

for instance, if zoom in 1:15, want split 15 bars instead of 3 (arbitrary number of bins here).
possible?


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -