quad_switch()
integrates quad_active()
and quad_anno()
into one
function for ease of use. This function allows you to quickly change the
active context of the quad_layout()
and its annotations.
hmanno
is an alias for quad_switch
, with additional arguments for
backward compatibility
Usage
quad_switch(
position = NULL,
size = NULL,
width = NULL,
height = NULL,
free_guides = waiver(),
what = waiver()
)
hmanno(
position = NULL,
size = NULL,
width = NULL,
height = NULL,
free_guides = waiver(),
what = waiver(),
...,
guides = deprecated(),
free_spaces = deprecated(),
plot_data = deprecated(),
theme = deprecated(),
free_labs = deprecated()
)
Arguments
- position
A string of
"top"
,"left"
,"bottom"
, or"right"
indicates which annotation stack should be activated. IfNULL
, it sets the active context to thequad_layout()
/ggheatmap()
itself.- size
A numeric value or an
unit
object to set the totalheight
/width
of the annotation stack.If
position
is"top"
or"bottom"
,size
sets the total height of the annotation.If
position
is"left"
or"right"
,size
sets the total width of the annotation.
- width, height
The relative width/height of the main plot, can be a
unit
object.- free_guides
Override the
guides
collection behavior specified in thequad_layout()
/ggheatmap()
for the annotation stack.- what
What should get activated in the annotation stack? A single number or string of the plot elements in the stack layout. If
NULL
, will remove any active context.- ...
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
An object that can be added to quad_layout()
/ggheatmap()
.
Examples
ggheatmap(matrix(rnorm(81), nrow = 9)) +
anno_top() +
align_dendro()
#> → heatmap built with `geom_tile()`