GeomRug

Rug geometry: short ticks along panel edges for each observation. Map aes.x for bottom/top sides and/or aes.y for left/right sides.

Defaults

geom
rug
default stat
identity
default position
identity
params type
RugParams

Svelte component

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

<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
  <GeomRug />
</GGPlot>

JSON layer

{
  "geom": "rug"
}

Params

sides

string

Which panel edges get ticks: any non-empty combination of "b" (bottom), "l" (left), "t" (top), "r" (right). Default "bl". Duplicates are treated as a set. Sides b/t require aes.x; sides l/r require aes.y.

length

number

Tick length as a fraction of the panel size along the tick axis (panel-fraction npc analogue of unit(0.03, "npc")). Default 0.03.

alpha

number

Tick opacity. Must be between 0 and 1 (inclusive). Default 1.

linewidth

number

Stroke width in px. Must be greater than 0. Default 1.

Allowed stats

Allowed positions

Examples

← All geoms · Getting started