D3: .scaleLinear, .axisRight: Axis Right

Forked script below was converted from D3.js v3 to v4.

d3.scaleLinear() and d3.axisRight() are v4 functions which have replaced d3.scale.linear() and d3.svg.axis().orient("right") respectively. d3.attr() calls are separate, e.g. .attr("width", width). axisNodes.selectAll() calls have been commented out because v4 ignores them.

The adapted code above is for v4, while the original code below is for v3.

D3 3.5.17 seems to have a similar existence to Python 2.7.13. Maintained to avoid alienating current users.