GeomHline
Horizontal reference-line alias. Canonicalized by normalize() to a rule layer. Annotation form: set params.yintercept. Data-driven form: map aes.y (inherited plot x is dropped so the one-axis rule contract holds).
Defaults
- geom
hline- default stat
identity- default position
identity- params type
HlineParams
Alias
normalize() rewrites this geom to rule (with this alias's default stat and position). Prefer the canonical geom in
new code.
Svelte component
import { GGPlot, GeomHline } from "@ggsvelte/svelte";
<GGPlot data={rows}>
<GeomHline />
</GGPlot> JSON layer
{
"geom": "hline"
} Params
yinterceptRuleInterceptANNOTATION FORM ONLY: draw a horizontal rule at each of these fixed y positions. Mutually exclusive with mapping aes.y on this layer.
alphanumberRule opacity. Must be between 0 and 1 (inclusive). Default 1.
linewidthnumberStroke width in px. Must be greater than 0. Default 1.
strokePaintGradientPaintWithin-mark gradient stroke paint (not a data scale). Requires a solid fallback.
glowGlowSpecBounded within-mark glow treatment (not theme decoration).
Allowed stats
identitydefault
Allowed positions
identitydefault