geom_hdr_rug: Rug plot for the highest density region

View source: R/geom-hdr-rug.R

geom_hdr_rugR Documentation

Rug plot for the highest density region

Description

rug visualization for HDR plot

Usage

geom_hdr_rug(
  mapping = NULL,
  data = NULL,
  stat = "hdr",
  position = "identity",
  ...,
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE,
  sides = "bl",
  rug_width = unit(0.03, "npc"),
  prob = c(0.5, 0.95, 0.99)
)

Arguments

mapping

Default: NULL

data

data

stat

stat

position

Default: "identity"

...

...

na.rm

Default: FALSE

show.legend

Default: NA

inherit.aes

Default: TRUE

sides

position to put rugs

rug_width

width of rugs, Default: unit(0.03, "npc")

prob

PARAM_DESCRIPTION, Default: c(0.5, 0.95, 0.99)

Value

Calculates and plots the rug plot of highest density regions.

Examples

library(ggplot2)

ggplot(faithful, aes(x = waiting, y = eruptions)) +
  geom_point() +
  geom_hdr_rug()

gghdr documentation built on Oct. 29, 2022, 1:16 a.m.