On this page

CoordSf

Fixed-aspect coordinates for already-projected geom_sf maps. Same layout as fixed; no CRS reproject or graticules in v1 — data must already be in plot space.

Svelte component

import { GGPlot, GeomPoint, CoordSf } from "@ggsvelte/svelte";

<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
  <GeomPoint />
  <CoordSf ratio={1} />
</GGPlot>

Declaration-only: emits no markup. Registers a live coord layer on init; inert without a <GGPlot> ancestor. Coords are REPLACE — the last registered coord wins.

JSON and helpers

import { coordSf } from "@ggsvelte/spec";

coordSf({ ratio: 1 })
// → { type: "sf" }  // ratio 1 is the default and normalize() may drop it
{
  "coord": { "type": "sf", "ratio": 1 }
}

Helper: coordSf (alias coord_sf) . Schema type: CoordSfSpec. Portable type: "sf". Builder: .coordSf(), .coord().

Props

Options map 1:1 to the portable coord object (excluding the type discriminant). On CoordTransform, x and y also accept a bare transform name string via the helper/shell sugar.

ratio

number

Physical y-unit length divided by physical x-unit length (default 1, equal projected units).

← All coords · Scales · Facets and coordinates