Public
Edited
Jun 26, 2022
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
height: 580,
width: 560,
grid: true,
color: {
legend: true,
label: "Intensity",
scheme: "ylgnbu",
domain: [0.0, 0.17],
ticks: 10,
width: 300,
height: 75,
marginBottom: 40,
marginLeft: 42
},
marks: [
Plot.rect(surface_plot, {
x: "x",
y: "y",
fill: "z",
interval: 5,
inset: -0.5,
}),
Plot.ruleX([0, 255]),
Plot.ruleY([150, 455])
]
})
Insert cell
Insert cell
embed({
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"width": 500,
"height": 500,
"data": {values: surface_plot},
"mark": "rect",
"encoding": {
"x": {
"field": "x",
"type": "quantitative",
"bin": {"maxbins": 100},
"title": "x",
},
"y": {
"field": "y",
"type": "quantitative",
"bin": {"maxbins": 100},
"title": "y",
},
"color": {
"field": "z",
"bin": {"maxbins": 20},
"title": "Intensity",
"scale": {"scheme": "yellowgreenblue"}, //"bluepurple" "viridis"
},
}
})
Insert cell
surface_plot = FileAttachment("surface_scan.csv").csv()
Insert cell
embed = require("vega-embed@6")
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