Skip to contents

[Experimental]

This function integrates the functionalities of stack_free() and stack_align() into a single interface. ggstack is an alias for stack_layout.

Usage

stack_layout(data = NULL, direction = NULL, type = 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".

type

A string indicating the stack layout type: "align" for aligned plots (stack_align()) or "free" for free stacking (stack_free()).

...

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

Value

A StackLayout object.

Examples

set.seed(123)
small_mat <- matrix(rnorm(56), nrow = 7L)
stack_layout(small_mat, "h", "align") + align_dendro()


# ggstack is an alias for `stack_layout`
ggstack(small_mat, "h", "align") + align_dendro()


# this is the same with:
stack_align(small_mat, "h") + align_dendro()