          .on("mouseout", -> d3.select(this).attr("opacity", "0"))
 
 
+  # label quantiles on right
+  rightAxis = svg.append("g")
+
   for j in [0...nQuant]
-    svg.selectAll("text.qu")
+    rightAxis.selectAll("text.qu")
        .data(data.qu)
        .enter()
        .append("text")

       .attr("dominant-baseline", "middle")


# load json file and call draw function
d3.json("hypo.json", draw)

     .attr("dominant-baseline", "middle")
     .attr("text-anchor", "end")


  # curves for quantiles
  colors = ["blue", "green", "orange", "red", "black"]
  for j in [3..0]
    colors.push(colors[j])

  curves = svg.append("g")

  for j in [0...nQuant]
    curves.append("path")
       .datum(data.ind)
       .attr("d", quline(j))
       .attr("class", "line")
       .attr("stroke", colors[j])

  # vertical rectangles representing each array
  indRectGrp = svg.append("g")

  indRect = indRectGrp.selectAll("rect.ind")
                 .data(data.ind)
                 .enter()
                 .append("rect")
