Published
Edited
Apr 19, 2021
1 fork
4 stars
Insert cell
Insert cell
Insert cell
function f(x) {
return Math.exp(-(x ** 2)) * Math.sin(50 * x);
}
Insert cell
Insert cell
{
let target = DOM.element('div');
functionPlot({
width: width,
xAxis: { domain: [-3, 3] },
target: target,
data: [
{
graphType: 'polyline',
fn: scope => f(scope.x)
}
]
});
return target;
}
Insert cell
functionPlot = require("function-plot@1/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