Skip to content

Commit 2600dd8

Browse files
committed
update CHANGELOG
1 parent dd9a389 commit 2600dd8

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

CHANGELOG.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ The [*marks* option](https://github.com/observablehq/plot/blob/main/README.md#ma
1717
<img width="636" alt="a line chart of Apple, Inc.’s daily closing stock price from 2013 to 2018, with a red ‘hello world’ label" src="https://user-images.githubusercontent.com/230541/130157120-8cbf8052-aa31-44ed-a650-d081c4a21d69.png">
1818

1919
```js
20-
Plot.marks(Plot.line(aapl, {x: "Date", y: "Close"}), () => svg`<text x=20% y=20% fill=red>Hello, world!</text>`).plot()
20+
Plot.marks(
21+
Plot.line(aapl, {x: "Date", y: "Close"}),
22+
() => svg`<text x=20% y=20% fill=red>Hello, world!</text>`
23+
).plot()
2124
```
2225

2326
The [Plot.marks(...*marks*)](https://github.com/observablehq/plot/blob/main/README.md#plotmarksmarks) function provides [*mark*.plot](https://github.com/observablehq/plot/blob/main/README.md#plotplotoptions) shorthand for array marks. This is useful for composite marks, such as [boxes](https://github.com/observablehq/plot/blob/8fef4fa52a4cca4135f5f964e3c328ef8f18f672/test/plots/morley-boxplot.js#L18-L23).
@@ -64,8 +67,6 @@ Plot.plot({
6467
})
6568
```
6669

67-
Diverging color scales now support transformations via four new scale types: *diverging-sqrt*, *diverging-pow*, *diverging-log*, and *diverging-symlog*, corresponding to the *sqrt*, *pow*, *log*, and *symlog* quantitative scale types respectively.
68-
6970
Diverging scales now support a *symmetric* option, which defaults to true, to ensure that differences above and below the pivot are equally apparent. (This assumes that the diverging scale’s interpolator is similarly symmetric; this is true of all the built-in diverging color schemes from ColorBrewer.) For example, the choropleth below exaggerates West Virginia’s population decline of −3% relative to Alaska’s gain of +3%. This exaggeration is caused by the domain of [−3%, +17%]: −3% is mapped to the darkest purple while +17% is mapped to the darkest green. (The pivot of 0 is mapped to the midpoint of the scheme, which is light gray here.)
7071

7172
<img width="642" alt="a choropleth with asymmetric diverging scale, showing the change in population of the fifty U.S. states between 2010 and 2019; the change in negative values is exaggerated" src="https://user-images.githubusercontent.com/230541/129834636-504214ae-2519-4814-9b2a-9ced7f65a1c5.png">
@@ -74,12 +75,41 @@ With the new *symmetric* option, the apparent difference between −3% and 0 is
7475

7576
<img width="641" alt="a choropleth with symmetric diverging scale, showing the change in population of the fifty U.S. states between 2010 and 2019; the change in negative values is commensurate with the change in positive values" src="https://user-images.githubusercontent.com/230541/129834634-2617a895-5040-4135-b015-0aa4b812c262.png">
7677

78+
Diverging color scales now also support transformations via four new scale types: *diverging-sqrt*, *diverging-pow*, *diverging-log*, and *diverging-symlog*, corresponding to the *sqrt*, *pow*, *log*, and *symlog* quantitative scale types respectively.
79+
7780
The new axis *line* option, which defaults to false, can be used to show a continuous line along the *x* or *y* axis. Using a rule to annotate a meaningful value, such as zero, is generally preferred over the *line* option.
7881

7982
### Facets
8083

8184
The mark *facet* option can be used to control whether or not a mark is faceted. The supported values are *auto*, *include*, and *exclude*. True is an alias for *include* and false is an alias for *exclude*. The default is *auto*, which facets a mark if and only if its data is strictly equal to the facet data. The *include* facet mode allows a mark with different data to be faceted; however, it requires that the mark’s data be parallel with the facet data (*i.e.*, have the same length and order). The *exclude* facet mode shows all data that are not present in the current facet; this can provide shared context across facets without overdrawing.
8285

86+
<img width="640" alt="a faceted scatterplot showing the correlation between culmen depth and length across sex and species; each facet shows the current sex and species with black dots and all other penguins as pale gray dots" src="https://user-images.githubusercontent.com/230541/130158213-2232800e-430a-4709-8b1b-8b44e6cf1fd8.png">
87+
88+
```js
89+
Plot.plot({
90+
facet: {
91+
data: penguins,
92+
x: "sex",
93+
y: "species",
94+
marginRight: 80
95+
},
96+
marks: [
97+
Plot.frame(),
98+
Plot.dot(penguins, {
99+
facet: "exclude",
100+
x: "culmen_depth_mm",
101+
y: "culmen_length_mm",
102+
r: 2,
103+
fill: "#ddd"
104+
}),
105+
Plot.dot(penguins, {
106+
x: "culmen_depth_mm",
107+
y: "culmen_length_mm"
108+
})
109+
]
110+
})
111+
```
112+
83113
When the facet *data* is null, a better error message is thrown.
84114

85115
### Transforms

0 commit comments

Comments
 (0)