Published
Edited
Sep 17, 2019
2 forks
11 stars
Insert cell
Insert cell
{
let target = DOM.element('div');
functionPlot({
title: 'y = x²',
data: [{
fn: 'x^2'
}],
target
});
return target;
}
Insert cell
{
let target = DOM.element('div');
functionPlot({
target,
xAxis: {domain: [-2, 12]},
data: [{
fn: '1+2sin(x)',
range: [2, 8],
closed: true
}]
})
return target
}
Insert cell
{
let target = DOM.element('div');
functionPlot({
target,
data: [
{ fn: 'sin(x)'},
{ fn: 'x'},
{ fn: 'x - x^3/3!',
sampler: 'builtIn',
graphType: 'polyline'},
{ fn: 'x - x^3/3! + x^5/5!',
sampler: 'builtIn',
graphType: 'polyline'}
]
})
return target
}
Insert cell
{
let target = DOM.element('div');
functionPlot({
title: 'Gamma function',
data: [{
     fn: 'gamma(x)',
sampler: 'builtIn',
graphType: 'polyline'
}],
target
});
return target;
}
Insert cell
[math.gamma(15), math.factorial(14)]
Insert cell
math = require('https://cdnjs.cloudflare.com/ajax/libs/mathjs/1.5.2/math.min.js')
Insert cell
d3 = require("d3@3")
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