Plot.plot({
y: {grid: true},
color: {legend: true},
marks: [
Plot.areaY(data3, {x: "x", y: (d) => Math.max(0, d.y), stroke: "z", fill: "z", fillOpacity: 0.5}),
Plot.areaY(data3, {x: "x", y: (d) => Math.min(-0.0, d.y), stroke: "z", fill: "z", fillOpacity: 0.5}),
Plot.ruleY([0])
]
})