Plot.plot({
style: "overflow: visible;",
insetTop: 30,
marginTop: 30,
marginRight: 100,
marks: [
Plot.tickY(global_temps, {x: "name", y: "value", sort: {x: "y"}, stroke: "value", title: "name", r: "value", opacity: 1, title: d=>d.yeardate + "\n" + d.value, opacity: 0.6, strokeWidth: 3,
filter: d=>d.year <= yearin
}),
Plot.axisY({ tickSize: 0, fontSize: 25, label: "Global surface temperatures", anchor: "right", labelAnchor: "center", ticks: 10, fill: "gray"}),
Plot.axisX({ tickSize: 0, fontSize: 25, label: "", anchor: "bottom", labelAnchor: "center", fill: "gray"}),
Plot.text([`Global Surface\nTemperatures`], {y:1.3, dx: -390, frameAnchor: "middle", fontSize:60, lineWidth: 25, textAnchor: "start", lineHeight: 1.2, clip: false, fill: "gray", opacity: 0.4}),
Plot.text(global_temps, {y:1, dx: -390, frameAnchor: "middle", fontSize: 100, text: "yearc", lineWidth: 25, textAnchor: "start", lineHeight: 1.2, clip: false, fill: "value", opacity: 2, filter: d=>d.year === yearin}),
Plot.text([`Data Source: TidyTuesday | Design: Deepsha Menghani | threads: IandLoveandDate`], {y:-0.6, dx: -100, dy:70, frameAnchor: "middle", fontSize: 14, fontStyle: "oblique", lineWidth: 70, textAnchor: "start", lineHeight: 1.2, clip: false, fill: "gray", opacity: 1}),
],
color: {scheme: "BuRd"},
height: 1000,
width: 1000,
marginBottom: 100,
marginLeft: 75
})