R scatter plot htmlwidget based on D3.js
JavaScript R CSS
Clone or download
Latest commit de222b0 Apr 2, 2018


scatterD3 is an HTML R widget for interactive scatter plots visualization. It is based on the htmlwidgets R package and on the d3.js javascript library.

CRAN Downloads Travis-CI Build Status CRAN_Status_Badge


Here is a small preview of what you will get :


Take a look at the visual guide for a list of features and examples. You can also test it live with the sample shiny app.


Install latest stable release from CRAN :


Or from Github for the latest, bleeding edge, full of bugs version :



Quick example of the scatterD3 function based on the mtcars dataset :

mtcars$names <- rownames(mtcars)
scatterD3(data = mtcars, x = wt, y = mpg, lab = names,
          col_var = cyl, symbol_var = am,
          xlab = "Weight", ylab = "Mpg", col_lab = "Cylinders",
          symbol_lab = "Manual transmission")

See the visual guide for a step-by-step guide and details about the different function arguments.

Shiny integration

Like every R HTML widget, shiny integration is straightforward. But as a D3 widget, scatterD3 is updatable : changes in settings or data can be displayed via smooth transitions instead of a complete chart redraw, which can provide interesting visual clues.

Furthermore, scatterD3 provides some additional handlers and callback hooks for a more complete JavaScript interactivity and integration.

The sample scatterD3 shiny app allows you to see the different features described here. You can check its source code on GitHub and the visual guide for a better understanding of the different arguments.


This package has been made possible by :