Platform
Resources
Pricing
Sign in
Get started
Oiar
Workspace
Fork
Published
By
Oiar
Edited
Dec 2, 2019
Insert cell
md
`# MathLine`
Insert cell
math
=
require
(
'mathjs'
)
Insert cell
Plotly
=
require
(
'plotly.js-dist'
)
Insert cell
{
const
X
=
math
.
range
(
-
8
,
8
,
0.01
)
.
toArray
(
)
const
Y
=
X
.
map
(
function
(
x
)
{
return
math
.
sin
(
x
)
}
)
const
data
=
[
{
x
:
X
,
y
:
Y
,
type
:
'line'
}
]
const
div
=
DOM
.
element
(
'div'
)
Plotly
.
newPlot
(
div
,
data
)
return
div
}
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.
Try it for free
Learn more
Fork
View
Export
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
math
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Plotly
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML