Cell_chart =
Plot.plot({
marginLeft:350,
width: 900,
inset: 10,
label: "",
x: {
tickFormat: d =>d+2000,
},
y: {
grid: true,
domain: [1000,8000],
},
color: {
},
marks: [
Plot.line(c_filter , {
sort:
"ID",
x:
c_year,
y:
c_gc,
sort: c_year,
stroke:
"#1bb24b",
strokeWidth: 4,
}),
Plot.line(y_avg , {
sort: "ID",
x: "YEAR",
y: "MEDIAN_grid_code",
stroke: "#e1e1e1", strokeWidth: 5,
curve: "catmull-rom",
}),
Plot.text("Yearly Average",{text: ["Yearly Average"], fontSize: 16, fill: "#e1e1e1", textAnchor: "middle", y: 5400, x: range -1,
}),
Plot.text("placeholder",{text: p, fontSize: 14, textAnchor: "middle", y: 7500, fill: "#e1e1e1",
})
]
})