{
const secondDigit = (d) => d["group"].slice(7, 9);
const tech = (d) => (+d["group"].slice(5, 6) <= 2 ? "VR" : "PC");
const audio = (d) => (+d["group"].slice(5, 6) % 2 ? "Bubble" : "Cocktail");
return Plot.plot({
grid: "true",
x: {
nice: true,
type: "pow",
ticks: 10,
exponent: 0.25
},
facet: {
data: data,
y: tech,
x: audio,
marginRight: 80
},
marks: [
Plot.frame(),
Plot.lineY(
data,
Plot.binX(
{
y: "count"
},
{
x: "distance",
stroke: secondDigit
}
)
),
Plot.tickY([0])
]
});
}