New to Plotly?
Plotly's R library is free and open source!
Get started by downloading the client and reading the primer.
You can set up Plotly to work in online or offline mode.
We also have a quick-reference cheatsheet (new!) to help you get started!
WebGL vs SVG in R
Recent versions of the R package include the
toWebGL() function, which converts any eligible SVG graph into a WebGL plot. With WebGL, we can render way more elements in the browser.
WebGL with 50,000 points
library(plotly) p <- ggplot(data = diamonds, aes(x = carat, y = price, color = cut)) + geom_point(alpha = 0.01) p <- ggplotly(p) %>% toWebGL() # Create a shareable link to your chart # Set up API credentials: https://plot.ly/r/getting-started chart_link = api_create(p, filename="webgl-1") chart_link