Inset and Aspect Ratio

Demonstrates how to use inset and aspect ratio in geographic projections.

<Slider bind:value={inset} min={0} max={50} label="inset" />
<Slider
    bind:value={aspect}
    min={0.35}
    max={2}
    step={0.01}
    label="aspect" />
<Plot
    projection={{
        type: 'transverse-mercator',
        rotate: [-centroid[0], -centroid[1]],
        inset,
        domain: selected
    }}
    height={(w) => w * aspect}>
    <Geo
        data={countries}
        opacity={0.2}
        fill="currentColor"
        stroke="var(--svelteplot-bg)"
        onclick={(d, e) => (selected = e)} />
    <Geo data={[selected]} />
</Plot>