This is the code for Chapter 4, Figure 7 from D3.js in Action shows how it is necessary to style the d3.svg.axis() elements, such as path.domain and the lines that represent the ticks, to create a proper axis.