Published
Edited
Jul 17, 2021
2 stars
Insert cell
Insert cell
a = [
[1,5],
[7,4],
[9,3]
]
Insert cell
Plot.plot({
x:{domain:[0,10],label:"x"},
y:{domain:[0,10],label:"y"},
marks:[
Plot.ruleX([0]),
Plot.ruleY([0]),
Plot.dot(a,{fill:"tomato",stroke:"black",r:5})
]
})
Insert cell
b = [
{x:1,y:5},
{x:7,y:4},
{x:9,y:3},
]
Insert cell
Plot.plot({
x:{domain:[0,10],label:"x"},
y:{domain:[0,10],label:"y"},
marks:[
Plot.ruleX([0]),
Plot.ruleY([0]),
Plot.dot(b,{x:"x",y:"y",fill:"tomato",stroke:"black",r:5})
]
})
Insert cell
x = [1,7,9]
Insert cell
y = [5,4,3]
Insert cell
Plot.plot({
x:{domain:[0,10],label:"x"},
y:{domain:[0,10],label:"y"},
marks:[
Plot.ruleX([0]),
Plot.ruleY([0]),
Plot.dot(x,{x:x,y:y,fill:"tomato",stroke:"black",r:5})
]
})
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