View source: R/ggstrat-plot_addons.R
layer_dendrogram | R Documentation |
Add a dendrogram as a layer or facet
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 )
object |
A nested_hclust object. |
mapping |
Map at least one axis (x or y) to a qualifier, like |
... |
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 |
A ggplot2::layer()
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.