orb_area: Area layer

View source: R/layers.R

orb_areaR Documentation

Area layer

Description

Fills the region between a line and a baseline.

Usage

orb_area(
  ...,
  data = NULL,
  fill = NULL,
  alpha = 0.45,
  baseline = 0,
  smooth = FALSE
)

Arguments

...

Aesthetic mappings for this layer only, as channel = column.

data

Optional data frame overriding the plot data.

fill

Fixed fill used when the fill channel is not mapped.

alpha

Opacity between 0 and 1.

baseline

Value the area is filled down to (default 0).

smooth

Draw a smoothed upper boundary. Default FALSE.

Value

An object of class orb_layer.

Examples

df <- data.frame(t = 1:40, v = abs(cumsum(rnorm(40))))
orb(df, x = t, y = v) + orb_area(alpha = 0.5) + orb_line()

orbis documentation built on Aug. 5, 2026, 9:08 a.m.