Plotly allows you to easily translate your ggplot2 graphics to an interactive web-based version, and also provides bindings to the plotly.js graphing library.
library(ggplot2) library(plotly) p <- ggplot(data = diamonds, aes(x = cut, fill = clarity)) + geom_bar(position = "dodge") ggplotly(p)
The R package also provides high-level bindings for working directly with plotly.js.
d <- diamonds[sample(nrow(diamonds), 500), ] plot_ly(d, x = d$carat, y = d$price, text = paste("Clarity: ", d$clarity), mode = "markers", color = d$carat, size = d$carat)
## Warning: `line.width` does not currently support multiple values.