Skip to content

Commit 6553e4a

Browse files
committed
Update CHANGELOG
1 parent 66ffea8 commit 6553e4a

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

CHANGELOG.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,23 @@ Plot.plot({
2727
})
2828
```
2929

30-
The new [dodge transform](./README.md#dodge) can be used to produce beeswarm plots. Given an *x* channel representing the desired horizontal position of circles, the dodgeY transform derives a new *y* (vertical position) channel such that the circles do not overlap; the dodgeX transform similarly derives a new *x* channel given a *y* channel. If an *r* channel is specified, the circles may have varying radius.
30+
The new [dodge transform](./README.md#dodge) can be used to produce beeswarm plots. Given an *x* channel representing the desired horizontal position of circles, the dodgeY transform derives a new *y* (vertical position) channel such that the circles do not overlap; the dodgeX transform similarly derives a new *x* channel given a *y* channel.
31+
32+
[<img src="./img/dodge-random.png" width="640" alt="a beeswarm chart showing a random normal distribution; each of 800 samples is represented by a dot positioned along the x-axis, stacked on top of the y-axis like grains of sand">](https://observablehq.com/@observablehq/plot-dodge)
33+
34+
```js
35+
Plot.plot({
36+
height: 320,
37+
x: {
38+
domain: [-3, 3]
39+
},
40+
marks: [
41+
Plot.dotX(Array.from({length: 800}, d3.randomNormal()), Plot.dodgeY())
42+
]
43+
})
44+
```
45+
46+
If an *r* channel is specified, the circles may have varying radius.
3147

3248
[<img src="./img/dodge.png" width="640" alt="a chart showing the monthly percent change in travel by U.S. county in March 2020 after the coronavirus outbreak; each county is represented as a circle with area proportional to its population, positioned according to the change in travel; most counties, and especially those with stay-at-home orders, show a significant reduction in travel">](https://observablehq.com/@observablehq/plot-dodge)
3349

img/dodge-random.png

178 KB
Loading

0 commit comments

Comments
 (0)