Gallery

71 figures · Open a figure to explore its code.

layout (11)

geometry (10)

plotting (16)

maps (9)

networks (6)

text (5)

math (12)

api (2)

(selected_region)

Selected-region fit

Set fit_to: [...] to fit a stable set of features. This example fits Germany, Poland, Czechia, Austria, and Switzerland by their atlas IDs. Fitting sets the view; the map still draws the surrounding geography within its viewport.

prepare_geo_source() prepares the atlas for the projection helper. create_geo_projection(prepared, view, width, height) returns the D3 projection used to transform the route's longitude/latitude positions into local pixels. The GeoMap receives matching projection, fit, padding, and viewport settings.

Only the geographic Group has fixed pixel dimensions, shared through mapWidth and mapHeight. Its fit scales the map, route, and markers together. TextFigure measures the heading, geographic canvas, and caption in order; changing the prose does not require shifting the map or moving the footer.

A polyline and circles connect Berlin, Prague, and Vienna. For a point helper that also checks visibility on a globe, see projected city markers.