Skip to content

Commit e4a00a3

Browse files
committed
Update CHANGELOG
1 parent 041a2e5 commit e4a00a3

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

CHANGELOG.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,34 @@ Plot now supports mark initializers via the **initializer** option. Initializers
88

99
The new hexbin transform functions similarly to the bin transform, except it aggregates both *x* and *y* into hexagonal bins before reducing. The size of the hexagons can be specified with the **binWidth** option, which controls the width of the (pointy-topped) hexagons.
1010

11+
<img src="./img/hexbin.png" width="640" alt="a chart showing the inverse relationship of fuel economy to engine displacement, and the positive correlation of engine displacement and weight; hexagonal bins of varying size represent the number of cars at each location, while color encodes the mean weight of nearby cars">
12+
13+
```js
14+
Plot.plot({
15+
color: {
16+
legend: true
17+
},
18+
marks: [
19+
Plot.hexagon(
20+
cars,
21+
Plot.hexbin(
22+
{r: "count", fill: "mean"},
23+
{x: "displacement (cc)", y: "economy (mpg)", fill: "weight (lb)"}
24+
)
25+
)
26+
]
27+
})
28+
```
29+
1130
The new hexgrid decoration mark draws a hexagonal grid. It is intended to be used with the hexbin transform as an alternative to the default horizontal and vertical axis grid.
1231

1332
The dot mark now supports the *hexagon* symbol type for pointy-topped hexagons. The new circle and hexagon marks are convenience shorthand for dot marks with the *circle* and *hexagon* symbol, respectively. The dotX, dotY, textX, and textY marks now support the **interval** option.
1433

1534
The new dodge transform 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.
1635

17-
The mark **sort** option now supports index sorting. For example, to sort dots by ascending radius:
36+
[breaking] Color scales with diverging color schemes now default to the *diverging* scale type instead of the *linear* scale type. This includes the *brbg*, *prgn*, *piyg*, *puor*, *rdbu*, *rdgy*, *rdylbu*, *rdylgn*, *spectral*, *burd*, and *buylrd* schemes. If you want to use a diverging color scheme with a linear color scale, set the scale **type** to *linear*. Color scales will also default to diverging if the scale **pivot** option is set. (For diverging scales, the **pivot** option defaults to zero.)
37+
38+
The **sort** transform option now supports sorting on an existing channel, avoiding the need to duplicate the channel definition. For example, to sort dots by ascending radius:
1839

1940
~~~js
2041
Plot.dot(earthquakes, {x: "longitude", y: "latitude", r: "intensity", sort: {channel: "r"}})
@@ -32,8 +53,6 @@ Marks can now define a channel hint to set the default range of the *r* scale. T
3253

3354
Improve performance of internal array operations, including type coercion.
3455

35-
[breaking] Color scales with diverging color schemes now default to the *diverging* scale type instead of the *linear* scale type.
36-
3756
[breaking] *mark*.initialize return signature.
3857

3958
## 0.4.3

img/hexbin.png

51.1 KB
Loading

0 commit comments

Comments
 (0)