Skip to contents

[Experimental]

The stack_align function aligns observations, while stack_free does not.

Several aliases are provided for convenience:

  • stack_alignv: A special case of stack_align that sets direction = "vertical".

  • stack_alignh: A special case of stack_align that sets direction = "horizontal".

  • stack_freev: A special case of stack_free that sets direction = "vertical".

  • stack_freeh: A special case of stack_free that sets direction = "horizontal".

Usage

stack_align(data = NULL, direction = NULL, ..., theme = NULL, sizes = NA)

stack_alignv(data = NULL, ...)

stack_alignh(data = NULL, ...)

stack_free(data = NULL, direction = NULL, ..., theme = NULL, sizes = NA)

stack_freev(data = NULL, ...)

stack_freeh(data = NULL, ...)

Arguments

data

Default dataset to use for the layout. If not specified, it must be supplied in each plot added to the layout. By default, it will try to inherit from parent layout:

direction

A string indicating the direction of the stack layout, either "horizontal" or "vertical".

...

Additional arguments passed to fortify_data_frame() or fortify_matrix().

theme

A theme() used to render the guides, title, subtitle, caption, margins, patch.title, panel.border, and background. If NULL (default), will inherit from the parent layout.

sizes

A numeric or a unit object of length 3 indicating the relative heights (for direction = "horizontal") or widths (for direction = "vertical").

Examples

set.seed(123)
stack_align(matrix(rnorm(56), nrow = 7L), "h") +
    align_dendro()