This is the code for Chapter 2, Figure 23 from D3.js in Action showing a simple scatterplot that uses d3.scale.linear and d3.time.scale to set the X position, Y position, radius and color of each datapoint represented by an SVG circle.
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js