Plot.plot({
height: 75,
insetLeft: 20,
x: {
domain: [-5, 5],
label: "Cerebral Perfusion Pressure (mmHg)",
axis: "bottom",
tickFormat: (d) => d + 60,
ticks: 5
},
y: {
domain: [-1000, 1000],
label: "PRx",
axis: null
},
marks: [
Plot.areaY(shade3, { x: "x", y: "y", fill: "#4ED762", opacity: 0.2 }),
Plot.areaY(shade4, { x: "x", y: "y", fill: "#4ED762", opacity: 0.2 }),
Plot.areaY(shade5, { x: "x", y: "y", fill: "#FD2E55", opacity: 0.2 }),
Plot.areaY(shade6, { x: "x", y: "y", fill: "#FD2E55", opacity: 0.2 }),
Plot.areaY(shade7, { x: "x", y: "y", fill: "#FD2E55", opacity: 0.2 }),
Plot.areaY(shade8, { x: "x", y: "y", fill: "#FD2E55", opacity: 0.2 }),
Plot.lineY(func, {
x: "x",
y: "y",
stroke: "black",
strokeWidth: 3
}),
Plot.dot(data_frame, {
x: x_input,
y: y_input,
r: 10,
fill: dot_color,
stroke: "#797979",
strokeWidth: 1,
symbol: "circle"
})
]
})