Public
Edited
Dec 7, 2023
Insert cell
Insert cell
Insert cell
screenshot20231206At70545Pm = FileAttachment("Screenshot 2023-12-06 at 7.05.45 PM.png").image()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
x: { label: "time period",
ticks: [0,1,2,3],
tickFormat: x=> ['0','1','2','3'] [x/1]
},
y: { label: "cash flows",
ticks: [-10, 0,5,15]
},
marks: [
Plot.lineY(data2, {
x: "year",
y: "cashFlow",
tip: false
}),
Plot.dotY(data, {
x: "year",
y: "cash flows",
tip: true
})
]
})
Insert cell
Insert cell
Plot.plot({
x: { label: "time period",
ticks: [0,1,2,3],
tickFormat: x=> ['0','1','2','3'] [x/1]
},
y: { label: "cash flows",
ticks: [-10, 0,5,15]
},
marks: [
Plot.lineY(data2, {
x: "year",
y: "cashFlow",
tip: false
}),
Plot.dotY(data, {
x: "year",
y: "cash flows",
fill: (d) => (d.cashflow > 0 ? "blue" : "red"),
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