legendaire = {
const width = 600;
const title = "Réutilisation des photographies"
const svg = d3.create("svg")
.attr("width", width)
const legend = svg.append("g")
.attr("transform", `translate(0,20)`)
.call(d3.axisBottom(color.copy().rangeRound(d3.quantize(d3.interpolate(0, width),color.domain().length))).tickSize(13).ticks(5))
.call(g => g.selectAll(".tick line").attr("stroke", "#fff"))
.call(g => g.select(".domain").remove());
legend.insert("image", "*")
.attr("width", width)
.attr("height", 13)
.attr("preserveAspectRatio", "none")
.attr("xlink:href", ramp(color).toDataURL());
legend.append("text")
.attr("class", "caption")
.attr("y", -6)
.attr("fill", "#000")
.attr("text-anchor", "start")
.attr("font-weight", "bold")
.text(title);
return svg.node()
}