Public
Edited
Feb 4, 2023
Insert cell
Insert cell
fields = [
"hic-arima2",
"pacbio",
"10x",
// "hic-dnazoo",
// "htag",
"illumina"
// "hic-dovetail"
]
Insert cell
Plot.plot({
marginTop: 80,
marginLeft: 150,
marginRight: 100,
r: {
type: "linear",
range: [5, 28]
},
color: {
scheme: "RdYlGn",
domain: [1, 5]
},
x: {
domain: fields,
axis: "top",
label: null,
tickSize: 0,
tickRotate: -35
},
y: {
domain: Array.from(new Set(data.map((d) => d.species))),
label: null,
tickSize: 0
},
marks: [
Plot.cell(data, {
x: "type",
y: "species",
fill: "value"
}),
Plot.ruleY(
[
data[data.map((d) => d.clade).findIndex((e) => e !== "dicots") - 1]
.species
],
{ dy: 5 }
),
Plot.ruleY(
[
data[
data
.map((d) => d.clade)
.findIndex((e) => e !== "dicots" && e !== "monocots") - 1
].species
],
{ dy: 5 }
)
],
width: 300,
height: 10000
})
Insert cell
Insert cell
data[data.map((d) => d.clade).findIndex((e) => e !== "dicots") - 1].species
Insert cell
data[
data
.map((d) => d.clade)
.findIndex((e) => e !== "dicots" && e !== "monocots") - 1
].species
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