geom_horizon: Plot a time series as a horizon plot

View source: R/geom_horizon.r

geom_horizonR Documentation

Plot a time series as a horizon plot

Description

A horizon plot breaks the Y dimension down using colours. This is useful when visualising y values spanning a vast range and / or trying to highlight outliers without losing context of the rest of the data.

Horizon plots are best viewed in an apsect ratio of very low vertical length.

Usage

geom_horizon(
  mapping = NULL,
  data = NULL,
  show.legend = TRUE,
  inherit.aes = TRUE,
  na.rm = TRUE,
  bandwidth = NULL,
  ...
)

GeomHorizon

stat_horizon(
  mapping = NULL,
  data = NULL,
  geom = "horizon",
  show.legend = TRUE,
  inherit.aes = TRUE,
  na.rm = TRUE,
  bandwidth = NULL,
  ...
)

StatHorizon

Format

An object of class GeomHorizon (inherits from GeomArea, GeomRibbon, Geom, ggproto, gg) of length 4.

An object of class StatHorizon (inherits from Stat, ggproto, gg) of length 5.

Aesthetics

x, y, fill. fill defaults to ..band.. which is the band number the current data fill area belongs in.

Other parameters

bandwidth, to dictate the span of a band.


hrbrmstr/ggalt documentation built on May 1, 2023, 7:36 a.m.