Skip to content

Commit e666bdf

Browse files
committed
update CHANGELOG
1 parent 4bd36f6 commit e666bdf

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

CHANGELOG.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,25 @@ Plot.plot({
175175

176176
The default *thresholds* option for the bin transforms is now *auto* instead of *scott*. The *auto* option applies a maximum limit of 200 bins to Scott’s rule. This reduces the risk of producing vanishing rects when they are too numerous and thin to be visible. (Note, however, that it is still possible to produce invisible rects if the insets are larger than the width.)
177177

178-
The normalize, window, and stack transforms can now accept a transform *options* argument in addition to an *inputs* argument that specifies the input channels. This allows makes these transforms more consistent with the other transforms, reduces ambiguity, and allows for additional shorthand. For example, you can pass *k* as the first argument to the window transform, here for a 12-month moving average:
178+
The normalize, window, and stack transforms can now accept a transform *options* argument in addition to an *inputs* argument that specifies the input channels. This allows makes these transforms more consistent with the other transforms, reduces ambiguity, and allows for additional shorthand. For example, you can pass *k* as the first argument to the window transform, here for a 24-month moving average:
179+
180+
<img width="640" alt="a smoothed line chart showing the rise of the average global surface temperature anomaly from 1880 to the present" src="https://user-images.githubusercontent.com/230541/130284148-04622afe-c8a9-4a1e-a459-ada8f1744a3e.png">
179181

180182
```js
181-
Plot.line(data, Plot.windowY(12, {x: "date", y: "unemployment", z: "division"}))
183+
Plot.plot({
184+
y: {
185+
label: "↑ Temperature anomaly (°C)",
186+
tickFormat: "+f",
187+
grid: true
188+
},
189+
marks: [
190+
Plot.ruleY([0]),
191+
Plot.line(gistemp, Plot.windowY(24, {x: "Date", y: "Anomaly"}))
192+
]
193+
})
182194
```
183195

184-
The *offset* = {*expand*, *silhouette*} stack option has been renamed to *offset* = {*normalize*, *center*}, respectively. The *shift* = {*centered*, *leading*, *trailing*} window option has been renamed to *anchor* = {*middle*, *start*, *end*} respectively. The old names are supported for backwards compatibility.
196+
The *offset* stack options have been renamed: *offset* = *expand* is now *offset* = *normalize*, and *offset* = *silhouette* is *offset* = *center*. The *shift* window option has been replaced with the *anchor* option: *shift* = *centered* is now *anchor* = *middle*, *shift* = *leading* is *anchor* = *start*, and *shift* = *trailing* is *anchor* = *end*. The old names are supported for backwards compatibility.
185197

186198
The basic transforms are now available as explicit option transforms: Plot.filter, Plot.sort, and Plot.reverse. These are useful when you wish to control the order of these transforms with respect to other transforms such as Plot.bin and Plot.stack.
187199

0 commit comments

Comments
 (0)