svgPanZoom - htmlwidget to Pan / Zoom R graphics
Note: this is very early alpha and highly experimental
svgPanZoom is a htmlwidgets wrapper for svg-pan-zoom.js. svgPanZoom gives R users an easy way to add panning and zooming to any R graphics (base, ggplot2, lattice, and lots more).
For now (not on CRAN) to get started, you will need to use devtools::install_github as shown below. If you do not have devtools, please install with install.packages("devtools").
devtools::install_github("timelyportfolio/svgPanZoom")
As stated in the introduction svgPanZoom works with almost all R graphics types. For base graphics, we'll need the svgAnnotation package.
library(svgPanZoom) # see install step above
library(svgAnnotation)
svgPanZoom(
svgPlot(
plot(1:10)
)
)