This is the code for Chapter 4, Figure 3 from D3.js in Action showing how to create a simple scatterplot.