Skip to contents
0.16.6 documentation

Complete canonical API text; task articles explain the workflows. Tutorials

Site guide · find your task

Keeps one output ribbon per input row while measuring density in normalized query/subject midpoint bins. The computed variables are the same as stat_ribbon_bundle(), so density can be mapped with aes(ribbon_alpha = after_stat(density)).

Usage

Code
stat_ribbon_density(
  mapping = NULL,
  data = NULL,
  bins = 80L,
  weight = c("length", "count", "pident"),
  group_by = NULL,
  position = "identity",
  show.legend = TRUE,
  inherit.aes = FALSE,
  ...
)

Arguments

mapping, data

Standard layer mapping and data arguments.

bins

Positive integer number of normalized midpoint bins per sequence.

weight

Density weight: "length", "count", or "pident".

group_by

Optional columns that define independent density groups.

position, show.legend, inherit.aes

Standard ggplot2 layer arguments.

...

Ribbon geometry and appearance arguments passed to geom_link_ribbon().

Value

A ggchord ribbon layer.