line_grid = (svg, s, n) => {
const g = svg.append("g");
let squares = g.selectAll("rect")
.data(square_grid(s, n, [0.5, 0.5], [0, 0]));
squares.enter()
.append("rect")
.attr("x", d => d.x)
.attr("y", d => d.y)
.attr("width", d => d.r)
.attr("height", d => d.r)
.attr("fill", "none")
.attr("stroke-width", 1.6)
.attr("stroke", "#212121");
squares.exit().remove();
return g;
}