layer_dendrogram: Add a dendrogram as a layer or facet

Description Usage Arguments Value Examples

View source: R/ggstrat-plot_addons.R

Description

Add a dendrogram as a layer or facet

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
layer_dendrogram(
  object,
  mapping,
  ...,
  colour = "black",
  size = 0.5,
  linetype = 1,
  alpha = NA,
  sequential_facets = TRUE
)

plot_layer_dendrogram(object, mapping, ..., panel_label = "CONISS")

layer_zone_boundaries(
  object,
  mapping,
  ...,
  linetype = 2,
  alpha = 0.7,
  colour = "black",
  size = 0.5
)

Arguments

object

A nested_hclust object.

mapping

Map at least one axis (x or y) to a qualifier, like aes(x = depth) or similar.

...

Use facet_var = "CONISS" or similar to name the panel

linetype, alpha, colour, size

Customize the apperance of boundary/dendrogram segment lines

sequential_facets

TRUE will result in the panel containing the dendrogram added to the right of the plot.

panel_label

Use to label a pane on a stanalone dendrogram plot

Value

A ggplot2::layer()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(ggplot2)
library(dplyr, warn.conflicts = FALSE)

alta_coniss <- nested_data(
  alta_lake_geochem,
  qualifiers = c(age, depth, zone),
  key = param,
  value = value,
  trans = scale
) %>%
  nested_chclust_coniss()

ggplot() +
  layer_dendrogram(alta_coniss, aes(y = depth)) +
  scale_y_reverse()

tidypaleo documentation built on April 7, 2021, 5:10 p.m.