    .attr("fill", color)
    .on("mouseover", (d) -> d3.select(this).attr("fill", hilit))
    .on("mouseout", (d) -> d3.select(this).attr("fill", color))
-   .on("click", (d) -> make_plot(d))
+   .on("click", (d) -> make_plot(d)) # <- click a button and make the plot
 
+# add text next to the buttons
 svg.selectAll("empty")
    .data(sets)
    .enter()

                         .pointsize(rad)
                         .pointcolor(color)

make_plot = (set) ->
    d3.json("http://localhost:8080/anscombe/#{set}", (data) ->
        d3.select("svg#scatterplot").remove()

        .attr("height", height)
        .attr("width", width + left_width)

# the four sets, and where the buttons will go
sets = ["I", "II", "III", "IV"]
y = (margin.top + i*button_size*1.5 for i of sets)

# add the four buttons
svg.selectAll("empty")
   .data(sets)
   .enter()
