3

R create interactive plot with slider which width could be changed, example below, I'm searching in ggvis R package, but other are also welcome :

enter image description here

Qbik
  • 5,885
  • 14
  • 62
  • 93

2 Answers2

6

Have a look at dygraphs and dyRangeSelector().

The dygraphs package is an R interface to the dygraphs JavaScript charting library. It provides rich facilities for charting time-series data in R

For more information and examples, have a look at dygraph's github.io:

install.packages("dygraphs")
library(dygraphs)
lungDeaths <- cbind(mdeaths, fdeaths)
dygraph(lungDeaths) %>%
  dySeries("mdeaths", label = "Male") %>%
  dySeries("fdeaths", label = "Female") %>%
  dyOptions(stackedGraph = TRUE) %>%
  dyRangeSelector(height = 20)

Which gives:

enter image description here

Steven Beaupré
  • 21,343
  • 7
  • 57
  • 77
4

Highcharts/Highstock it's another great tool for this kind of plots and there is an awesome API wrapper in R: http://jkunst.com/highcharter/

enter image description here

Lorenzo Rossi
  • 1,481
  • 1
  • 9
  • 16