             .attr("id", "plot")
             .attr("transform", "translate(#{margin.left},#{margin.top})")
 
-        @draw(@x, @y)
+
+        #x = [-0.5, 0, 0.5]
+        #@p = new Plot x, (g(u) for u in x)
+
+
+        @pwl(@x, @y)
         #@circ([200,100])
         #@circ([100,200])
 

        #guide.attr("x2", @xScale $blab.Figure.xMax*cos(phi))
        #guide.attr("y2", @yScale $blab.Figure.xMax*sin(phi))

    draw: (X, Y)->
        lineData = ({ x: x, y:Y[i] } for x,i in X)
        @plot.append("path")
            .attr("d", @lineFunction(lineData))

            .attr('y1', height)
            .style('stroke-opacity', 1e-6)
            .remove()
        
    initAxes: ->
        @xScale = d3.scale.linear() # sim units -> screen units
