Skip to content

Commit 609ded8

Browse files
committed
Update CHANGELOG
1 parent 9cfe501 commit 609ded8

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
*Not yet released. These are forthcoming changes in the main branch.*
66

7-
The new [density mark](./README.md#density) creates contours representing the [estimated density](https://en.wikipedia.org/wiki/Multivariate_kernel_density_estimation) of point clouds.
7+
The new [density mark](./README.md#density) creates contours representing the [estimated density](https://en.wikipedia.org/wiki/Multivariate_kernel_density_estimation) of two-dimensional point clouds. The **bandwidth** and number of **thresholds** can be configured.
88

99
[<img src="./img/density-contours.png" width="640" height="400" alt="A scatterplot showing the relationship between the idle duration and eruption duration for Old Faithful">](https://observablehq.com/@observablehq/plot-density)
1010

@@ -19,6 +19,20 @@ Plot.plot({
1919
})
2020
```
2121

22+
By default, the density is represented by contour lines. By setting the **fill** option to *density*, you can draw filled regions with a sequential color encoding instead.
23+
24+
[<img src="./img/density-fill.png" width="640" height="500" alt="A contour plot showing the relationship between diamond price and weight">](https://observablehq.com/@observablehq/plot-density)
25+
26+
```js
27+
Plot.density(diamonds, {x: "carat", y: "price", fill: "density"}).plot({
28+
height: 500,
29+
grid: true,
30+
x: {type: "log"},
31+
y: {type: "log"},
32+
color: {scheme: "ylgnbu"}
33+
})
34+
```
35+
2236
The new [linear regression marks](./README.md#linear-regression) produce [linear regressions](https://en.wikipedia.org/wiki/Linear_regression) with [confidence interval](https://en.wikipedia.org/wiki/Confidence_interval) bands, representing the estimated relation of a dependent variable (typically *y*) on an independent variable (typically *x*).
2337

2438
[<img src="./img/linear-regression.png" width="640" height="400" alt="a scatterplot of penguin culmens, showing the length and depth of several species, with linear regression models by species and for the whole population, illustrating Simpson’s paradox">](https://observablehq.com/@observablehq/plot-linear-regression)

img/density-fill.png

124 KB
Loading

0 commit comments

Comments
 (0)