function renderGrid(canvas) {
const grid = canvas.select("g.grid")
.attr("transform", `translate(${margin}, ${margin})`);
grid.selectAll("*").remove();
const linearizedMatrix = linearizeMatrix(matrix);
const cells = grid.selectAll("g.cell").data(linearizedMatrix).enter()
.append("g")
.attr("class", "cell")
.attr("transform", d => `translate(${d.col * spacing}, ${d.row * spacing})`);
const boundary = cells.append("rect")
.attr("class", "boundary")
.attr("width", spacing)
.attr("height", spacing)
.attr("stroke", "transparent")
.attr("fill", d => color(getShephardsInterpolatedValue(d.value)))
.on("click", (event, d) => {
});
return canvas;
}