Skip to content

Commit da17f3a

Browse files
committed
test style
1 parent 2cee9bd commit da17f3a

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

test/plots/letter-frequency-cloud.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@ import * as d3 from "d3";
44
export default async function() {
55
const alphabet = await d3.csv("data/alphabet.csv", d3.autoType);
66
const random = d3.randomLcg(3);
7-
const m = d3.max(alphabet, d => d.frequency);
8-
const x = alphabet.map(random);
9-
const y = alphabet.map(random);
7+
const max = d3.max(alphabet, d => d.frequency);
108
return Plot.plot({
11-
x: { axis: null, domain: [-0.1, 1.1] },
12-
y: { axis: null, domain: [-0.1, 1.2] },
9+
x: {
10+
axis: null,
11+
domain: [-0.1, 1.1]
12+
},
13+
y: {
14+
axis: null,
15+
domain: [-0.1, 1.2]
16+
},
1317
marks: [
14-
Plot.text(alphabet, {x, y, text: "letter", fontSize: d => 10 + 200 * (d.frequency / m)})
18+
Plot.text(alphabet, {x: random, y: random, text: "letter", fontSize: d => 10 + 200 * (d.frequency / max)})
1519
]
1620
});
1721
}

0 commit comments

Comments
 (0)