{
const margin = 40;
const a = Plot.plot({
facet: { data: de_dust2, x: "att_side" },
margin,
width: width * 1.5,
fx: { padding: 0.1 },
marks: [Plot.frame({ stroke: "white" })]
});
const bw = a.scale("fx").bandwidth;
return Plot.plot({
facet: { data: de_dust2, x: "att_side" },
margin,
x: { domain: [+map_data_de_dust2.StartX, +map_data_de_dust2.EndX] },
y: { domain: [+map_data_de_dust2.StartY, +map_data_de_dust2.EndY] },
width: width * 1.5,
fx: { padding: 0.1 },
height: bw+(margin*2),
marks: [
Plot.image([{ url: de_dust2Url }], {
frameAnchor: "middle",
height: bw,
width: bw,
src: "url"
}),
Plot.frame({ stroke: "white" }),
Plot.dot(de_dust2, {
x: "att_pos_x",
y: "att_pos_y",
fill: "density",
fillOpacity: 0.5,
r: 2
}),
Plot.density(de_dust2, {x: "att_pos_x", y: "att_pos_y", bandwidth: 1, thresholds: 300, stroke:"density"}),
]
});
}