Anaglyph 3D scatterplot

The effect you see here is a result of doing the following:
  1. Adding red
  2. Adding blue
  3. Adding black
  4. Scaling size by draw order
  5. Grading opacity by draw order
var makeChart = function (dodge, yshift, color, scaleOpacity) {
    chart.selectAll(".dot")
        .data(mydata)
        .enter().append("circle")
        .attr("r", function (d, i) { return r(i) })
        .attr("cx", function (d, i) { 
            return x(d.sepalWidth) + z(i * dodge); 
        })
        .attr("cy", function (d, i) { 
            return y(d.petalLength) 
        })
        .style("fill", color)
        .attr("opacity", function(d, i){ 
            if(scaleOpacity == true) {
                return opacityScale(i/39)
            }
            if(scaleOpacity == false){ return 1}
        })
}

// red
makeChart(dodge = 1, yshift = 1, color = "#FF0000", scaleOpacity = false) 
// blue
makeChart(dodge = -1, yshift = -1, color = "#00FFFF", scaleOpacity = false) 
// white
makeChart(dodge = 0, yshift = 0, color = "#FFFFFF", scaleOpacity = false)
// black, last so that it's on top 
makeChart(dodge = 0, yshift = 0, color = "#000000", scaleOpacity = true)