 
             # draw this band
     
-            yscale.range [0, height]
-            yscale.domain limits 
+            ys.range [0, height]
+            ys.domain limits 
 
             canvas.fillStyle = colors[m + band]
-            y1 = yscale(v)
+            y1 = ys(v)
             canvas.fillRect t, height - y1, stepWidth, y1
 
 

      .text((d) -> d.key)
      .on "click", ->  d3.select(this.parentElement).select("input")[0][0].click()



    horizons.exit().remove()

      if showLegend then do ->
        n = if showNegativeLegend then 2*m else m

        if update
          parent.select("div.legend").select("svg").remove()          

        parent.select("div.legend")
          .append("svg")
            .attr("width", 100)
            .attr("height", n * 15 + 15)
          .append("g")
            .attr("class", "content")
            .attr("transform", "translate(0, 10)")

        legend = parent.select("div.legend").select("g.content")

