e().getBoundingClientRect().height;
  var outputContext = outputCanvas.node().getContext("2d");

  var drag = d3.drag()
      .container(inputCanvas.node())
      .on("start", drawStart)
      .on("drag", draw)
      .on("end", drawEnd);
  // start - after a new pointer becomes active (on mousedown or touchstart).
  // drag - after an active pointer moves (on mousemove or touchmove).
  // end

  inputContext.strokeStyle = "black";
  inputContext.lineWidth = 1;
  function drawStart() {
    var dx = xScale.in