Public
Edited
Apr 26, 2023
Insert cell
Insert cell
a = {
let functionPlot = await require("function-plot@1.22.2/dist/function-plot");
let target = DOM.element('div')
functionPlot({
target,
xAxis: { domain: [0, 50], label: "↑ Dog Age (years)"},
yAxis: { domain: [0, 100], label: "↑ Human Age (years)" },
disableZoom: true,
annotations: [
// { x: 1, text: 'a' },
// { x: 2, text: 'b' },
// { y: 4, text: 'm_1' },
// { y: 2.25, text: 'm_2' }
],
data: [
// {
// fn: '16 * log(x) + 31',
// graphType: 'scatter'
// }
{
fn: '16 * log(x) + 31',
graphType: 'scatter'
// range: [50, 100],
// nSamples: 3,
// closed: true
}
]
})
return target
}
Insert cell
functionPlot = require("function-plot@1.22.2/dist/function-plot")
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