It’s tricky but possible:
d3.groups(grouped_tracks, (d) => `${d.WSR_ID}:${d.CELL_ID}:${d.run_id}`)
.map(([z, track]) =>
Plot.line(track, {
x: "LON",
y: "LAT",
stroke: "blue",
strokeWidth: (d) => d.MAX_REFLECT - 45,
render: function (index, scales, values, dimensions, context, next) {
const g = next(index, scales, values, dimensions, context);
g.style.opacity = 0.1;
return g;
}
})
),
this however won’t work well with the automatic tip mark (tip: true), so you’ll need to create a second mark just for the tip.