Minimap
A small overview of a plot's whole extent, with a rectangle to drag its view around (a 3D plot gets an orientation gadget).
Static preview; loading the interactive plot
<script>
import { Minimap, Plot, Points } from "hmplot";
const data = { x: [1, 2, 3, 4], y: [3, 1, 4, 2] };
let plot = $state();
</script>
<Plot bind:this={plot} {data} height={300} axes2d>
<Points x="x" y="y" />
</Plot>
<Minimap for={plot} />
Usage
for selects the source (target in Python). axes defaults to false. Source updates repaint overview content; camera-only navigation updates the viewport rectangle. 3D views use the orientation gadget. The minimap takes its plot’s background and text color, and leaves text out (labels, TeX and a map’s place names). A live VectorTile’s minimap shows the whole world, from its zoom-0 tile.