Skip to content

Commit c70d2cf

Browse files
committed
extended projection example
1 parent 25caeb1 commit c70d2cf

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,24 @@ Plot.plot({
102102
})
103103
```
104104

105+
Extended projections using D3’s *projection*.stream interface.
106+
107+
[<img src="./img/goode.png" width="640" alt="A world map using Goode’s interrupted homolosine projection">](https://observablehq.com/@observablehq/plot-projections)
108+
109+
```js
110+
Plot.plot({
111+
width: 975,
112+
height: 424,
113+
inset: 1,
114+
projection: ({width, height}) => d3.geoInterruptedHomolosine().fitSize([width, height], {type: "Sphere"}),
115+
marks: [
116+
Plot.geo(land, {clip: "sphere", fill: "currentColor"}),
117+
Plot.graticule({clip: "sphere"}),
118+
Plot.sphere()
119+
]
120+
})
121+
```
122+
105123
For more, see [Mapping with Plot](https://observablehq.com/@observablehq/plot-mapping).
106124

107125
Mark-level facets via the *mark*.**fx** and *mark*.**fy** option. E.g., facet annotations, or mixing datasets across marks while using facets.

img/goode.png

104 KB
Loading

0 commit comments

Comments
 (0)