grid_with_title | R Documentation |
Draw Heatmap with title and subtitle using grid viewports
grid_with_title(
object,
title = NULL,
title_fontsize = 18,
title_just = "centre",
caption = NULL,
caption_fontsize = 12,
caption_just = "left",
caption_x = NULL,
verbose = FALSE,
...
)
object |
an object with class |
title |
character string used as title. When |
title_fontsize |
numeric value indicating the font size,
with units |
title_just |
character string indicating the justification (alignment) of the title. |
caption , caption_fontsize , caption_just |
arguments equivalent to the title_* arguments. |
caption_x |
numeric value in grid units specifying where to
position the caption text. By default when |
verbose |
logical indicating whether to print verbose output. |
... |
additional arguments are ignored. |
This function is likely to work only with grid
or ComplexHeatmap
input. Other objects that have draw()
defined may not work
properly.
Note: This function may be superceded by the ability to include
an overall title when using ComplexHeatmap::draw()
, which was not
originally possible.
This function is intended to help make it easier to wrap a
heatmap from ComplexHeatmap::Heatmap()
inside the relevant
grid viewports in order to display one large title at the
top of the resulting visualization, and optionally one
subtitle at the bottom of the visualization.
The input can be one heatmap (Heatmap
object),
or object of class "gTree"
, or any object with a method
draw()
associated with it, detected by
methods::hasMethod("draw", class(object))
.
A good example of "gTree"
object is the result of
calling draw()
inside grid::grid.grabExpr()
, for example:
grid::grid.grabExpr(ComplexHeatmap::draw(...))
The ComplexHeatmap::draw()
function has extended capability
for arranging one or more heatmaps and associated annotations.
The byproduct of this function is to draw a grid visualization
that includes a title and subtitle, then the object
in the center.
Other jam plot functions:
adjust_polygon_border()
,
jam_igraph()
,
mem_enrichment_heatmap()
,
mem_gene_path_heatmap()
,
mem_legend()
,
mem_multienrichplot()
,
mem_plot_folio()
,
plot_layout_scale()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.