Platform
Resources
Pricing
Sign in
Get started
Michael Cooper
Developer @Observable
Workspace
Fork
Public
By
Michael Cooper
Edited
Apr 1
3 stars
Insert cell
Insert cell
Insert cell
Insert cell
chart
=
Plot
.
plot
(
{
insetTop
:
10
,
insetBottom
:
10
,
width
,
y
:
{
domain
:
[
-
1
,
1
]
}
,
clip
:
true
,
marks
:
[
Plot
.
frame
(
)
,
Plot
.
lineY
(
data
,
{
x
:
"x"
,
y
:
"y"
,
strokeWidth
:
"x"
,
opacity
}
)
]
}
)
Insert cell
data
=
d3
.
range
(
0
,
Math
.
PI
*
4
,
(
(
Math
.
PI
*
4
)
/
width
)
*
density
)
.
map
(
(
x
)
=>
(
{
x
,
y
:
Math
.
sin
(
x
)
}
)
)
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
density
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
opacity
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
chart
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
data
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML