Skip to content

Commit 43aaeb0

Browse files
committed
rule y = 0
1 parent 0edb16c commit 43aaeb0

File tree

2 files changed

+81
-74
lines changed

2 files changed

+81
-74
lines changed

test/output/athletesSortFacet.svg

Lines changed: 73 additions & 72 deletions
Loading

test/plots/athletes-sort.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ import * as d3 from "d3";
33

44
export async function athletesSortFacet() {
55
const athletes = await d3.csv("data/athletes.csv", d3.autoType);
6-
const f = (d) => d.sex === "female";
7-
return Plot.barX(athletes, Plot.groupZ({x: "mean"}, {x: f, fy: "sport", sort: {fy: "x"}})).plot({marginLeft: 90});
6+
const female = (d) => d.sex === "female";
7+
return Plot.plot({
8+
marginLeft: 100,
9+
marks: [
10+
Plot.barX(athletes, Plot.groupZ({x: "mean"}, {x: female, fy: "sport", sort: {fy: "x"}})),
11+
Plot.frame({anchor: "left", facet: "super"})
12+
]
13+
});
814
}

0 commit comments

Comments
 (0)