Plot.plot({
marginLeft: 60,
marginBottom: 80,
x: {
label: "Time",
type: "band",
domain: timeOrder,
tickRotate: -45
},
y: {
label: "Intensity",
domain: [0, maxIntensity]
},
color: {
legend: true,
label: "Emotion"
},
marks: [
Plot.link(segments2, {x1: "x1", y1: "y1", x2: "x2", y2: "y2", stroke: "Emotion"}),
Plot.dot(thoughtsData, {x: "Time", y: "Intensity", fill: "Emotion"})
]
});