Public
Edited
May 13, 2023
1 fork
5 stars
Insert cell
Insert cell
Plot.plot({
round: true,
marginLeft: 0, // don’t need left-margin since labels are inset
x: {label: null, insetLeft: 36}, // reserve space for inset labels
marks: [
Plot.gridY({
strokeDasharray: "0.75,2", // dashed
strokeOpacity: 1 // opaque
}),
Plot.axisY({
tickSize: 0, // don’t draw ticks
dx: 38, // offset right
dy: -6, // offset up
lineAnchor: "bottom", // draw labels above grid lines
tickFormat: (d, i, _) => (i === _.length - 1 ? `$${d}` : d)
}),
Plot.ruleY([0]),
Plot.line(aapl, {x: "Date", y: "Close", markerEnd: "dot"})
]
})
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