Public
Edited
Feb 18, 2024
1 fork
1 star
Insert cell
Insert cell
Insert cell
function equation1(x) {
// you can comment in any of these equations. Be sure to comment out the unused equations. :)
// return x * x;
// return Math.log(x);
// return Math.sin(x);

return Math.sin(x) + Math.sin(2 * x);
}
Insert cell
function equation2(x) {
// you can modify this equation
return Math.log(x);
}
Insert cell
function equation3(x) {
// you can modify this equation

return Math.abs(x % Math.PI);
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
chartData = computeChartData(range[0], range[1], width, [equation1, equation2, equation3])
Insert cell
Insert cell
Insert cell
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