Plot.plot({
marginLeft: 55,
marginBottom: 55,
marginTop: 55,
height: 600,
width: 900,
y: {
grid: true,
tickFormat: "+f",
label: "Temperatura (°C)",
ticks: 6,
},
x: {
label: "Día del año",
},
color: {
scheme: "BuRd",
legend: true
},
marks: [
Plot.ruleY([0]),
Plot.dot(datos, {x: "dia_year", y: "tmed", stroke : (d) => d.tipo == "temp_max" ? "#e0144c" : "#3d348b", fill : (d) => d.tipo == "temp_max" ? "#db6666" : "#574d68", opacity : (d) => d.year == 2023 ? 1 : 0.02, symbol : "triangle", tip: true},),
Plot.tip(datos, Plot.pointer({ x: "x", y: "y" }))
],
})