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
quad_switch(
position = NULL,
size = NULL,
width = NULL,
height = NULL,
free_guides = waiver(),
initialize = NULL,
what = waiver()
)hmanno(
position = NULL,
size = NULL,
width = NULL,
height = NULL,
free_guides = waiver(),
initialize = NULL,
what = waiver()
)
An object that can be added to quad_layout()
/ggheatmap()
.
A string of "top"
, "left"
, "bottom"
, or "right"
indicates which annotation stack should be activated. If NULL
, it sets the
active context to the quad_layout()
/ggheatmap()
itself.
A numeric value or an unit
object to set the
total height
/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.
The relative width/height of the main plot, can be a
unit
object.
Override the guides
collection behavior specified in the
quad_layout()
/ggheatmap()
for the annotation stack.
A boolean indicating whether the annotation stack should be
initialized if it is not already. By default, the annotation stack layout
will attempt to initialize when the data is compatible. If set to TRUE
, and
the data in quad_layout()
/ggheatmap()
is incompatible with the annotation stack, no
data will be used in the stack.
What should get activated in the annotation stack?
A single number or string of the plot elements in the layout. If NULL
, will remove any active context.
quad_active()
/quad_anno()
ggheatmap(matrix(rnorm(81), nrow = 9)) +
anno_top() +
align_dendro()
Run the code above in your browser using DataLab