scheme_align | R Documentation |
The scheme_align()
function defines the align Specifications for plots.
scheme_align(guides = NA, free_spaces = NA, free_labs = NA)
guides |
A string with one or more of |
free_spaces |
A string with one or more of Usually you want to apply this with the whole layout, instead of individual plots. |
free_labs |
A string with one or more of |
A scheme_align
object.
set.seed(123)
mat <- matrix(rnorm(72), nrow = 8)
# used in the layout, define the default action for all plots in the layout
ggheatmap(mat) -
scheme_align(guides = NULL) +
anno_right() +
align_dendro(aes(color = branch), k = 3)
# You can also add it for a single plot
ggheatmap(mat) -
# for all plots in the layout, we default won't collect any guide legends
scheme_align(guides = NULL) +
# for the heatmap body, we collect guide legends in the right
# note, the guide legends will be collected to the right side of the
# layout which will overlap the legends in the right annotation
scheme_align(guides = "r") +
anno_right() +
align_dendro(aes(color = branch), k = 3)
# to avoid overlapping, we can also collect the guide legends in the
# right annotation
ggheatmap(mat) -
scheme_align(guides = NULL) +
scheme_align(guides = "r") +
anno_right() +
align_dendro(aes(color = branch), k = 3) +
scheme_align(guides = "r")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.