Public
Edited
Oct 19, 2023
Insert cell
Insert cell
practice_data@2.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
practice_data2
X
this
Y
that
Color
Size
Facet X
Facet Y
Mark
rule
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell
Plot.plot({
marks: [
Plot.ruleY([0]),
]
})
Insert cell
Plot.plot({
marks: [Plot.dot(practice_data2, { x: "this", y: "that", tip: true })]
})
Insert cell
Plot.plot({

x: {domain : [0,3.5], ticks: 4, tickFormat: s => s.toFixed(0)},
y: {domain : [0,1], ticks : 1},
marks: [
Plot.ruleY([0]),
Plot.ruleX(practice_data2, { x: "this", y: "that", tip: true }),
Plot.dot(practice_data2, { x: "this", y: y => y.that > 0 ? y.that + .01 : y.that, tip: true })
]
})
Insert cell
horizontal_graph.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
data
X
money
Y
year
Color
Size
Facet X
Facet Y
Mark
dot
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell
Plot.plot({

x: {domain : [0,110], ticks: 0},
y: {tickFormat: x => x.toFixed(0)},
marks: [Plot.barX(data, { x: "money", y: "year", tip: true }),
Plot.text(data, {x : x => x.money + 5, y : "year", tip: true, text : "money"})]
})
Insert cell
Plot.plot({
x: {},
marks: [Plot.barX(data12, { x: "value", y: "year", tip: true })]
})
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