stack_active
is an alias for stack_switch()
, which sets what = NULL
by
default, with additional arguments for backward compatibility.
Usage
stack_switch(sizes = NULL, what = waiver())
stack_active(
sizes = NULL,
what = NULL,
...,
guides = deprecated(),
free_spaces = deprecated(),
plot_data = deprecated(),
theme = deprecated(),
free_labs = deprecated()
)
Arguments
- sizes
A numeric or a
unit
object of length3
indicating the relative heights (fordirection = "horizontal"
) or widths (fordirection = "vertical"
).- what
What should get activated for the stack layout? A single number or string of the plot elements in the stack layout. If
NULL
, will remove any active context, this is useful when the active context is aquad_layout()
object, where anyalign_*()
will be added to thequad_layout()
. By removing the active context, we can addalign_*()
into thestack_layout()
.- ...
These dots are for future extensions and must be empty.
- guides
Please use
plot_align()
function instead.- free_spaces
Please use
plot_align()
function instead.- plot_data
Please use
plot_data()
function instead.- theme
Please use
plot_theme()
function instead.- free_labs
Please use
plot_align()
function instead.
Value
A stack_switch
object which can be added to stack_layout()
.
Examples
stack_align(matrix(1:9, nrow = 3L), "h") +
ggheatmap() +
# ggheamtap will set the active context, directing following addition
# into the heatmap plot area. To remove the heatmap active context,
# we can use `stack_active()` which will direct subsequent addition into
# the stack
stack_active() +
# here we add a dendrogram to the stack.
align_dendro()
#> → heatmap built with `geom_tile()`