Platform
Resources
Pricing
Sign in
Get started
Observable
The end-to-end solution for building and hosting better data apps, dashboards, and reports.
Workspace
Fork
Public
By
Mike Bostock
Edited
Oct 20, 2023
1 fork
8 stars
Insert cell
Insert cell
Plot
.
plot
(
{
style
:
{
backgroundColor
:
"black"
,
color
:
"white"
,
padding
:
"16px"
// Don’t forget the "px"!
}
,
marks
:
[
Plot
.
dot
(
penguins
,
{
x
:
"flipper_length_mm"
,
y
:
"body_mass_g"
}
)
]
}
)
Insert cell
Plot
.
plot
(
{
style
:
`
background-color: rebeccapurple;
color: springgreen;
padding: 16px;
`
,
marks
:
[
Plot
.
dot
(
penguins
,
{
x
:
"flipper_length_mm"
,
y
:
"body_mass_g"
}
)
]
}
)
Insert cell
Plot
.
plot
(
{
className
:
"custom-plot"
,
// see stylesheet below
marks
:
[
Plot
.
dot
(
penguins
,
{
x
:
"flipper_length_mm"
,
y
:
"body_mass_g"
}
)
]
}
)
Insert cell
<
style
type
=
"text/css"
>
svg
.
custom-plot
{
background-color
:
darkslateblue
;
color
:
yellow
;
padding
:
16
px
;
}
</
style
>
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
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML