     d.x = jitter_value(d.x, w)
     d.y = jitter_value(d.y, h)
 
-recreate_points = ->
+recreate_points = (duration) ->
+   duration ?= 1000
+  
    svg.selectAll("circle.points")
       .data(data)
       .enter()


exitbutton.on "click", ->
           remove_datapoint()
           recreate_points()

      .attr("stroke-width", 2)
   svg.selectAll("circle.points")
      .data(data)
      .transition().duration(duration)
      .attr("cx", (d) -> d.x+pad)
      .attr("cy", (d) -> d.y+pad)
   svg.selectAll("circle.points")
      .data(data)
      .exit().remove()

n = 5
data = []
