It is a common and necessary practice in datavisualization to personalize the general appearance of your chart. This post takes a basic scatterplot and suggest different themes to display it. These themes are often inspired from existing library in other languages but not only.
Mimicking ggplot2 style in d3.js
ggplot2 is the most famous R library for datavisualization. It is known for this grey background that makes it easy to recognize.
Note that a g element can not receive any style. Thus, a rectangle must be drawn on the chart area with a grey fill.
An axis is a path element of class domain with g elements of class tick. This allow customization modifying the css of these classes.
Mimicking the ipsum style of the hrbrmstr R library in d3.js