{
const svg = d3.select(DOM.svg(width, height))
var color = d3.scaleLinear().range([0,1]).domain([0,collectLines.length]);
var palette = d3.interpolatePlasma;
const margin = 35
const x = d3.scaleLinear().range([margin,width-margin]).domain(d3.extent(allXvalues))
const y = d3.scaleLinear().range([height-margin,margin]).domain(d3.extent(allYvalues))
svg
.append("g")
.attr("class", "x axis")
.attr("transform", "translate(0," + (height-margin) + ")")
.call(d3.axisBottom(x));
svg.append("g")
.attr("class", "y axis")
.attr("transform", "translate("+ (margin) + ",0)")
.call(d3.axisLeft(y));
const line = d3.line()
.x(d=>x(d.x))
.y(d=>y(d.y))
.curve(d3.curveLinear)
svg.selectAll("path.line").data(collectLines).enter().append("path")
.attr("class", "line")
.attr("d", d=> line(d))
.style("stroke",(d,i)=>palette(color(i)))
.style("stroke-width","1px")
.style("fill","none")
yield svg.node();
}