Public
Edited
Mar 4, 2024
Insert cell
Insert cell
Insert cell
Plot.plot({
height: 450,
width: width,
marginLeft: 50,
marginBottom: 50,
marginTop: 50,
x: {
label: "→ Année",
grid: true,
axis: "bottom",
tickRotate: -45
},
y: {
label: "En MtCO2"
},
marks: [
Plot.barY(dataset_2, {
x: "Année",
y: "Aérien métropole",
fill: (d) => (d.Année == "2000" ? "#fb8072" : "#80b1d3")
}),
Plot.text(["Aérien métropole"], {
frameAnchor: "top",
dy: -30,
fontSize: 16,
fontWeight: "regular",
lineAnchor: "bottom",
text: (d) => d
})
]
})
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more