add_tracks | R Documentation |
ggheatmap
add_tracks() is a shortcut for building a new panel of ggplot2::geom_tile()
s
with track_columns
and adding it to the ggheatmap
. It works if track_columns
are included in ggData(gghm)
.
add_tracks(
gghm,
track_columns,
track_colors = list(),
pal_dir = 1,
track_prop = 0.3,
leg_ncol = 3,
fontsize = 11,
track_pos = "bottom",
legend_action = "collect",
show_legend = TRUE
)
gghm |
An ggplot object of class |
track_columns |
A vector with names of columns to be plotted. |
track_colors |
A named list where names are the same as
|
pal_dir |
palette direction, used if |
track_prop |
A number between 0 and 1, representing the height proportion between new tracks and the heatmap. |
leg_ncol |
Number of columns in the track legends. Passed to
|
fontsize |
Base fontsize for plot, which will be used by the theme.
Ultimately passed to |
track_pos |
One of: 'bottom' or 'top'. |
legend_action |
A string specifying how guides should be treated in the layout.
See: guides in |
show_legend |
If FALSE, no legend is added to the ggheatmap for the tracks |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.