Platform
Resources
Pricing
Sign in
Get started
Data Visualisation
Workspace
Fork
Public
Worksheets: Learn Plot
By
Jannik
Edited
Apr 25, 2023
17
Worksheets: Learn Plot
Plot Resources
What is Plot?
Table
Scatterplot
Bar Chart
🏁 Checkpoint: Interactive Visualization of Your Data
🏁 Assignment: Build a Plot and Tweak It
Line Chart
Area Chart
🏁 Assignment: Upgrade Your Line Chart
Candlestick Chart
🏁 Assignment: Upgrade Your Dashboard
👥 Assignment: Technical Analysis Dashboard
Group Assignment #2: Your Data on Observable
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import
{
data_meteorites
as
data_meteoritesInitial
}
from
"@datavisufs/table"
Insert cell
Insert cell
Insert cell
// Uncomment below to enable
Inputs
.
table
(
data_meteoritesInitial
)
Insert cell
Insert cell
Insert cell
// Uncomment below to enable
data_meteorites
=
aq
.
from
(
data_meteoritesInitial
)
.
select
(
'name'
,
'mass'
,
'fall'
,
'year'
)
.
sample
(
10_000
)
// uncomment if your computer is slowing down
.
rename
(
{
mass
:
"massInGrams"
}
)
// uncomment later
.
derive
(
{
mass
:
d
=>
d
.
massInGrams
/
1000000
}
)
// uncomment later
.
objects
(
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
dot
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
}
)
]
}
)
Insert cell
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
dot
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
r
:
"mass"
}
)
]
,
}
)
Insert cell
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
dot
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
r
:
"mass"
,
fill
:
"mass"
}
)
]
,
}
)
Insert cell
Insert cell
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
dot
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
r
:
"mass"
,
fill
:
"fall"
}
)
]
,
}
)
Insert cell
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
dot
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
r
:
"mass"
,
fill
:
"mass"
,
fillOpacity
:
0.4
}
)
]
,
}
)
Insert cell
Insert cell
Insert cell
Plot
.
plot
(
{
color
:
{
legend
:
true
,
scheme
:
"Cool"
}
,
marks
:
[
Plot
.
dot
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
r
:
"mass"
,
fill
:
"fall"
,
fillOpacity
:
0.8
}
)
]
}
)
Insert cell
Insert cell
Insert cell
Plot
.
plot
(
{
color
:
{
legend
:
true
,
scheme
:
"Cool"
}
,
marks
:
[
Plot
.
dot
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
r
:
"mass"
,
fill
:
"mass"
,
fillOpacity
:
0.9
}
)
]
}
)
Insert cell
Insert cell
Insert cell
Insert cell
Plot
.
plot
(
{
color
:
{
legend
:
true
,
scheme
:
"Cool"
}
,
marks
:
[
Plot
.
dot
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
r
:
"mass"
,
fill
:
"mass"
,
fillOpacity
:
0.9
,
}
)
,
Plot
.
text
(
data_meteorites
,
{
x
:
1840
,
y
:
16
,
text
:
[
"Hello→"
]
,
fontSize
:
20
,
fill
:
"blue"
}
)
]
}
)
Insert cell
Insert cell
Insert cell
Insert cell
Plot
.
plot
(
{
color
:
{
legend
:
true
,
scheme
:
"Cool"
}
,
marks
:
[
Plot
.
dot
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
r
:
"mass"
,
fill
:
"mass"
,
fillOpacity
:
0.9
,
}
)
,
Plot
.
text
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
text
:
"name"
,
fontSize
:
"mass"
,
fill
:
"black"
}
)
]
}
)
Insert cell
Insert cell
Insert cell
Plot
.
plot
(
{
color
:
{
legend
:
true
,
scheme
:
"Cool"
}
,
marks
:
[
Plot
.
dot
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
r
:
"mass"
,
fill
:
"mass"
,
fillOpacity
:
0.9
,
}
)
,
Plot
.
text
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
text
:
d
=>
d
[
"mass"
]
>
5
?
d
[
"name"
]
:
""
,
fontSize
:
"mass"
,
fill
:
"black"
}
)
]
}
)
Insert cell
Insert cell
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
dot
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
fill
:
"dodgerblue"
}
)
]
}
)
Insert cell
Insert cell
Insert cell
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
dot
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
fill
:
"dodgerblue"
}
)
,
Plot
.
link
(
{
length
:
1
}
,
{
x1
:
0
,
y1
:
0
,
x2
:
2000
,
y2
:
2
}
)
]
}
)
Insert cell
Insert cell
Insert cell
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
dot
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
fill
:
"dodgerblue"
}
)
,
Plot
.
linearRegressionY
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
stroke
:
"steelblue"
,
ci
:
0.95
}
)
,
]
,
x
:
{
label
:
"year→ "
}
,
y
:
{
label
:
"↑Mass in tons"
}
}
)
Insert cell
Insert cell
Insert cell
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
dot
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
fill
:
"dodgerblue"
,
}
)
,
Plot
.
linearRegressionY
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
stroke
:
"steelblue"
,
ci
:
0.95
,
}
)
,
]
,
x
:
{
label
:
"year→ "
}
,
y
:
{
label
:
"↑Mass in tons"
,
grid
:
true
,
}
}
)
Insert cell
Insert cell
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
dot
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
fill
:
"dodgerblue"
,
}
)
,
Plot
.
linearRegressionY
(
data_meteorites
,
{
x
:
"year"
,
y
:
"mass"
,
stroke
:
"steelblue"
,
ci
:
0.95
,
}
)
,
]
,
x
:
{
label
:
"year→ "
,
tickFormat
:
d3
.
format
(
".0f"
)
}
,
y
:
{
label
:
"↑Mass in tons"
,
grid
:
true
,
}
}
)
Insert cell
Insert cell
Insert cell
import
{
Wrangler
,
op
}
from
"@observablehq/data-wrangler"
Insert cell
Insert cell
import
{
imageToDo
}
from
"@clokman/student-blocks"
Insert cell
imageToDo
Insert cell
import
{
toc
}
from
"@nebrius/indented-toc"
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
data_meteorites
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML