Public
Edited
Dec 23
Insert cell
Insert cell
Plot.plot({
marginLeft: 170,

marks: [
Plot.barX(presidents, {
y: "Name",
x: (d) => d["Very Favorable %"]
})
]
})
Insert cell
Insert cell
Insert cell
Plot.plot({
marginLeft: 170,
x: { axis: "both" },
marks: [
Plot.barX(presidents, {
y: (d) => d["Name"],
x: "Very Favorable %"
}),
Plot.axisY({
label: null,
textAnchor: "end",
fill: "black",
tickPadding: 18
}),
Plot.image(presidents, {
y: "Name",
x: 0,
dx: -12,
r: 9,
preserveAspectRatio: "xMidYMin slice",
src: "Portrait URL"
}),
Plot.gridX({ interval: 10, stroke: "#DCDCDC", strokeOpacity: 0.5 })
]
})
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