# `GigRidges.Ridgeline`
[🔗](https://github.com/giggleton/gig_ridges/blob/v0.1.0/lib/gig_ridges/ridgeline.ex#L1)

The ridgeline geom: each group a ridge along `x`, its baseline its `y` and its top `scale` times
its `height` above it, filled down to the baseline and outlined along the top, drawn back to
front so a lower ridge is drawn over the one above it.

A point whose height is below `min_height` is left out of its ridge, which breaks there; with no
`min_height`, a point below 0 is, and a point whose mapped `min_height` is missing is never cut
off. The density ridges' geom (`GigRidges.DensityRidgeline`) cuts at `rel_min_height` times the
layer's greatest height, across every panel, in its place. A quantile line or jittered point, a
row whose `datatype` is `"vline"` or `"point"`, is never cut off, however low its ridge is cut.

`scale` and `min_height` are each an option and an aesthetic: given as an option, its value is
every point's; else a mapped column gives each point its own; else its default, a `scale` of 1,
which the density ridges' geom makes 1.8, and a `min_height` of 0. The vertical ridgeline's geom
(`GigRidges.VRidgeline`) draws through it turned, up `y`, its `width` and `min_width` in place
of `height` and `min_height`.

It draws by delegation to Giggly's ribbon (`Giggly.Geom.Ribbon`): its setup works out each
point's `ymin` and `ymax` and hands the rows to the ribbon's setup, and each ridge is drawn by the
ribbon, as is its legend key, which needs room as wide as its line, where
the ribbon's needs twice that. Rows whose `datatype` is `"vline"`, the quantile lines the density
ridges' stat writes, are kept from the ribbon and drawn as lines from each ridge's baseline up
to it, between its fill and its top line, in the ridge's colour, line width and line type, or in
the `vline_color:` (or `vline_colour:`), `vline_width:` and `vline_linetype:` given, each over
the ridge's own. Rows whose `datatype` is `"point"`, the
jittered points, are kept from the ribbon too and drawn after the ridge and its lines, each at
its value and its `ymin`, as R's shape 19 1.5 mm across and outlined 0.5 mm, in the ridge's
colour, fill and alpha, or the `point_shape:`, `point_size:`, `point_stroke:`, `point_color:` (or
`point_colour:`), `point_fill:` and `point_alpha:` given, each over the ridge's.

# `t`

```elixir
@type t() :: %GigRidges.Ridgeline{
  along: :x | :y,
  cut_off: :min_height | :rel_min_height | :min_width,
  gradient: :none | float(),
  iscaled: boolean(),
  min_height: :none | float(),
  outline: :upper | :full,
  point_alpha: term(),
  point_color: term(),
  point_colour: term(),
  point_fill: term(),
  point_shape: term(),
  point_size: term(),
  point_stroke: term(),
  rel_min_height: :none | float(),
  scale: :none | float(),
  unmapped_scale: float(),
  vline_color: term(),
  vline_colour: term(),
  vline_linetype: term(),
  vline_width: term()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
