Skip to content

Title and legend

Shapes and side by side

Crop a map to a circle for a poster, or set two maps side by side.

Circle

shape="circle" crops the map to the largest circle that fits, the round poster look. The page around it takes backdrop= or the theme's ground colour, and the map's credits move outside the circle. shape="rounded" rounds the corners instead.

shape-circle

mixed = buildings.assign(mix=[i % 5 for i in range(len(buildings))])
kh.map(mixed, "theme-poster fill-[mix] scheme-cat ramp-poster-warm stroke-transparent legend-none",
       shape="circle", title="Khartoum", title_style="bottom-left bg-white font-[Caveat] text-4xl")

Side by side

kh.compare(map_a, map_b)              # linked: pan or zoom one, both move
kh.compare(map_a, map_b, map_c, link=False)

Linking runs in the notebook's Python kernel, so it works in a live notebook, not in an exported page.