Published
Edited
Mar 9, 2021
2 forks
Importers
11 stars
Also listed in…
Inputs
Insert cell
Insert cell
a
Insert cell
viewof a = drawBoxOnImage({
image: await FileAttachment("mona-lisa.jpg").image(),
width: width / 3,
zoom: true,
padding: 0,
value: [{ x: 38, y: 7 }, { x: 65, y: 9 }, { x: 90, y: 91 }, { x: 1, y: 79 }]
})
Insert cell
viewof b = drawBoxOnImage({
image: await FileAttachment("mona-lisa.jpg").image(),
width: width / 4,
zoom: false,
padding: 0.15,
background: false,
radius: 12,
label: true,
value: [
{ x: 0, y: 0 },
{ x: 50, y: 0 },
{ x: 100, y: 50 },
{ x: 100, y: 100 },
{ x: 50, y: 100 },
{ x: 0, y: 50 }
]
})
Insert cell
viewof c = drawBoxOnImage({
image: await FileAttachment("mona-lisa.jpg").image()
})
Insert cell
Insert cell
viewof d = drawBoxOnImage({
image: video,
radius: 12,
label: i => ['A', 'B', 'C', 'D'][i]
})
Insert cell
viewof e = drawBoxOnImage({
image: video,
radius: width / 30,
value: [{ x: 50, y: 50 }],
label: i => '1 pt',
width: width / 4
})
Insert cell
viewof f = drawBoxOnImage({
image: video,
radius: width / 30,
value: [{ x: 30, y: 50 }, { x: 70, y: 50 }],
label: i => ['two', 'pts'][i],
width: width / 4
})
Insert cell
Insert cell
Insert cell
Insert cell
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