Plot.plot({
marks: [
() => htl.svg`<defs>
<linearGradient id="gradient" gradientTransform="rotate(90)">
<stop offset="15%" stop-color="#88B8FF" />
<stop offset="75%" stop-color="#BED8FF" />
<stop offset="100%" stop-color="#DCEAFF" />
</linearGradient>
</defs>`,
Plot.barY(data_1975_mois, { x: "datetxt", y: "valeur_rr", fill: "url(#gradient)"}),
() =>
Plot.plot({
marginLeft: 70,
marginRight: 50,
marginBottom: 50,
width: Math.min(width, 780),
height: 400,
marks: [
Plot.line(data_1975_mois, {
x: "datetxt",
y: "moy_temp",
stroke: "black",
strokeWidth: 2
})
],
x: { type: "band", axis: null },
y: { axis: "right", nice: true, line: true, label:"Température moyenne (°C)" }
})
],
marginLeft: 70,
marginRight: 50,
marginBottom: 50,
width: Math.min(width, 780),
height: 400,
x: { tickRotate: -45, tickFormat: "", label:"Mois" },
y: { axis: "left", label: "Précipitations (mm)", line: true },
})