       .attr("stroke-width", 2)
    svg.selectAll("circle.points")
       .data(data)
-      .transition().duration(1000)
+      .transition().duration(duration)
       .attr("cx", (d) -> d.x+pad)
       .attr("cy", (d) -> d.y+pad)
    svg.selectAll("circle.points")
       .data(data)
-      .exit()
-      .attr("r", 0).remove()
+      .exit().remove()
 
 n = 5
 data = []


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

    d.x = jitter_value(d.x, w)
    d.y = jitter_value(d.y, h)

recreate_points = (duration) ->
   duration ?= 1000
  
   svg.selectAll("circle.points")
      .data(data)
      .enter()
