You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Naturally, it works with Plot’s core features, including scales, legends, and faceting.
25
25
26
26
[<imgsrc="./img/faceted-map.png"width="930"alt="A dot map of Walmart store openings faceted by decade">](https://observablehq.com/@observablehq/plot-geo)
The new top-level [**projection** option](https://observablehq.com/@observablehq/plot-projections) controls how geometry coordinates are mapped to the screen. While primarily for the geo mark, it works automatically with most of Plot’s other mark types. For example, here is a map using vectors to show county-level vote margins in the 2020 U.S. presidential election.
45
43
46
44
[<imgsrc="./img/vector-map.png"width="640"alt="An arrow map showing the county-level vote margins in the 2020 U.S. presidential election; a margin for Biden is shown as a blue left-pointing arrow, and a margin for Trump is shown as a red right-pointing arrow">](https://observablehq.com/@observablehq/plot-projections)
47
45
@@ -66,7 +64,7 @@ Plot.plot({
66
64
})
67
65
```
68
66
69
-
Projected line.
67
+
With the line mark, it’s not just a point projection; the line mark automatically passes line geometry through the projection, allow projections to interpret line segments as geodesics and to clip or cut as needed. For example, the route of the HMS *Beagle* shown below is automatically cut when it crosses the antimeridian.
70
68
71
69
[<imgsrc="./img/beagle.png"width="640"alt="A map of the route of the HMS Beagle, 1831–1836; color indicates direction, with the ship initially departing London and heading southwest before circumnavigating the globe">](https://observablehq.com/@observablehq/plot-projections)
72
70
@@ -82,7 +80,7 @@ Plot.plot({
82
80
})
83
81
```
84
82
85
-
Projected transforms (hexbin aggregation).
83
+
Plot’s projection system works with Plot’s transforms. For example, the map below demonstrates using the hexbin transform to aggregate projected locations into local hexagons.
86
84
87
85
[<imgsrc="./img/hexbin-map.png"width="640"alt="A bivariate hexbin map of Walmart store openings; within each hexagonal area, size indicates the number of Walmart store openings, and color indicates the year of the first opening">](https://observablehq.com/@observablehq/plot-projections)
88
86
@@ -102,7 +100,7 @@ Plot.plot({
102
100
})
103
101
```
104
102
105
-
Extended projections using D3’s *projection*.stream interface.
103
+
While a variety of basic projections are included by default, Plot’s projection system can be extended using any implementation that is compatible with D3’s *projection*.stream interface. This includes the existing d3-geo-projection and d3-geo-polygon libraries. For example, here is a world map using Goode’s interrupted homolosine projection.
106
104
107
105
[<imgsrc="./img/goode.png"width="640"alt="A world map using Goode’s interrupted homolosine projection">](https://observablehq.com/@observablehq/plot-projections)
0 commit comments