{
const svg = d3
.create("svg")
.attr("width", svgWidth)
.attr("height", svgHeight);
svg
.append("rect")
.attr("width", svgWidth)
.attr("height", svgHeight)
.attr("fill", d3.interpolateViridis(0));
svg
.selectAll(".curves")
.data(cleanedData)
.enter()
.append("path")
.attr("fill", "none")
.attr("stroke", (d, i) => d3.interpolateViridis(i / (sampleCount - 1)))
.attr("stroke-width", 2)
.attr("opacity", 0.5)
.attr("class", "curves")
.attr("d", (d) => lineGen(d));
return svg.node();
}