Skip to content

Commit a946fd9

Browse files
committed
Update CHANGELOG
1 parent 63c40ef commit a946fd9

File tree

3 files changed

+41
-10
lines changed

3 files changed

+41
-10
lines changed

CHANGELOG.md

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Plot.plot({
3737
})
3838
```
3939

40-
The same data, as filled contours in projected coordinates:
40+
The same data, with a smidge of blur, as filled contours in projected coordinates:
4141

4242
[<img src="./img/ca55-contours.webp" width="650" alt="A map showing the varying intensity of the magnetic field as periodically observed from an airplane flying in an approximate grid pattern">](https://observablehq.com/@observablehq/plot-raster)
4343

@@ -51,7 +51,7 @@ Plot.plot({
5151
})
5252
```
5353

54-
Naturally, the raster and contour mark support Plot’s [projection system](./README.md#projection-options), allowing spatial samples to be shown in any geographic projection and in conjunction with other geographic data. The *equirectangular* projection is the natural choice for this gridded global water vapor dataset from [NASA Earth Observations](https://neo.gsfc.nasa.gov/view.php?datasetId=MYDAL2_M_SKY_WV&date=2022-11-01).
54+
Naturally, the raster and contour mark are compatible with Plot’s [projection system](./README.md#projection-options), allowing spatial samples to be shown in any geographic projection and in conjunction with other geographic data. The *equirectangular* projection is the natural choice for this gridded global water vapor dataset from [NASA Earth Observations](https://neo.gsfc.nasa.gov/view.php?datasetId=MYDAL2_M_SKY_WV&date=2022-11-01).
5555

5656
[<img src="./img/water-vapor.png" width="650" alt="A map of global atmospheric water vapor, showing a higher concentration of water vapor near the equator">](https://observablehq.com/@observablehq/plot-raster)
5757

@@ -79,23 +79,54 @@ Plot.plot({
7979
})
8080
```
8181

82-
TK random-walk for interpolating categorical data.
82+
The raster and contour mark also support sampling continuous spatial functions *f*(*x*, *y*). For example, here is the famous Mandelbrot set, with color encoding the number of iterations before the point escapes:
8383

84-
The *fill* and *fillOpacity* channels may alternatively be specified as continuous functions *f*(*x*, *y*) to be evaluated at each pixel centroid of the raster grid (without interpolation). TODO Show Mandelbrot instead.
85-
86-
[<img src="./img/heatmap.png" width="640" alt="A heatmap of the trigonometric function atan2(y, x)">](https://observablehq.com/@observablehq/plot-raster)
84+
[<img src="./img/mandelbrot.webp" width="640" alt="The Mandelbrot set">](https://observablehq.com/@observablehq/plot-raster)
8785

8886
```js
89-
Plot.raster({fill: (x, y) => Math.atan2(y, x), x1: -1.66, y1: -1, x2: 1.66, y2: 1}).plot()
87+
Plot.plot({
88+
height: 500,
89+
marks: [
90+
Plot.raster({
91+
fill: (x, y) => {
92+
for (let n = 0, zr = 0, zi = 0; n < 80; ++n) {
93+
[zr, zi] = [zr * zr - zi * zi + x, 2 * zr * zi + y];
94+
if (zr * zr + zi * zi > 4) return n;
95+
}
96+
},
97+
x1: -2,
98+
y1: -1.164,
99+
x2: 1,
100+
y2: 1.164,
101+
pixelSize: 0.5
102+
})
103+
]
104+
})
90105
```
91106

92-
TODO show spike map example.
107+
The [vector mark](./README.md#vector) now supports the **shape** constant option; the built-in shapes are *arrow* (default) and *spike*. A custom shape can also be implemented, returning the corresponding SVG path data for the desired shape. The new [spike convenience constructor](./README.md#plotspikedata-options) creates a vector suitable for spike maps. The vector mark also now supports an **r** constant option to set the shape radius.
93108

94-
The [vector mark](./README.md#vector) now supports the **shape** constant option. The built-in shapes are *arrow* (default) and *spike*. A custom shape can also be implemented, returning the corresponding SVG path data for the desired shape. The new [spike convenience constructor](./README.md#plotspikedata-options) creates a vector suitable for spike maps. The vector mark also now supports an **r** constant option to further customize the shape.
109+
[<img src="./img/spike-map.webp" width="640" alt="A spike map of U.S. county population">](https://observablehq.com/@observablehq/plot-vector)
110+
111+
```js
112+
Plot.plot({
113+
width: 960,
114+
height: 600,
115+
projection: "albers-usa",
116+
length: {
117+
range: [0, 200]
118+
},
119+
marks: [
120+
Plot.geo(nation, {fill: "#e0e0e0"}),
121+
Plot.geo(statemesh, {stroke: "white"}),
122+
Plot.spike(counties.features, Plot.geoCentroid({stroke: "red", length: (d) => population.get(d.id)}))
123+
]
124+
});
125+
```
95126

96127
The new [geoCentroid transform](./README.md#plotgeocentroidoptions) and [centroid initializer](./README.md#plotcentroidoptions) compute the spherical and projected planar centroids of geometry, respectively.
97128

98-
Diverging scales now correctly handle descending domains. When the stack **order** option is used without a *z* channel, a helpful error message is now thrown. The **clip** option *frame* now correctly handles band scales. Using D3 7.8.1, generated SVG path data is now rounded to three decimal points to reduce output size.
129+
Diverging scales now correctly handle descending domains. When the stack **order** option is used without a *z* channel, a helpful error message is now thrown. The **clip** option *frame* now correctly handles band scales. Using D3 7.8, generated SVG path data is now rounded to three decimal points to reduce output size.
99130

100131
## 0.6.1
101132

img/mandelbrot.webp

50.5 KB
Binary file not shown.

img/spike-map.webp

185 KB
Binary file not shown.

0 commit comments

Comments
 (0)