Published unlisted
Edited
Aug 6, 2022
1 star
Insert cell
Insert cell
// A simple SVG image that we'd like to include in a Plot.
pic = svg`
<svg width=${w} height=${h}>
<circle cx=${w / 2} cy=${h / 2} r=${w / 20} fill='black'></circle>
</svg>`
Insert cell
Plot.plot({
width: w,
height: h,
marks: [
Plot.line([
[0, 0],
[1, 1]
]),
() => svg`${pic.outerHTML}`
]
})
Insert cell
w = width < 500 ? width : 500
Insert cell
h = 0.625 * w
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