ggheatmap
is an alias of heatmap_layout
.
heatmap_layout(
data,
mapping = aes(),
...,
filling = TRUE,
.width = NA,
.height = NA,
guides = waiver(),
theme = NULL,
set_context = TRUE,
order = NULL,
name = NULL
)ggheatmap(
data,
mapping = aes(),
...,
filling = TRUE,
.width = NA,
.height = NA,
guides = waiver(),
theme = NULL,
set_context = TRUE,
order = NULL,
name = NULL
)
A HeatmapLayout
object.
A numeric or character vector, a data frame, and any other data which can be converted into a matrix. Simple vector will be converted into a one column matrix.
Default list of aesthetic mappings to use for plot. In
addition, we will always add mapping aes(.data$.x, .data$.y)
.
Additional arguments passed to geom_tile.
Only used when filling = TRUE
.
A boolean value indicating whether to fill the heatmap. If you
wish to customize the filling style, set this to FALSE
.
By default, the classic heatmap colour scheme
scale_fill_gradient2(low = "blue", high = "red")
is utilized for continuous values.
You can use the option
"ggalign.heatmap_continuous_fill"
or
"ggalign.heatmap_discrete_fill"
to modify the
default heatmap body fill color scale. See
scale_fill_continuous()
or
scale_fill_discrete()
for option setting
details.
Heatmap body width/height, can be a unit object.
A string containing one or more of "t"
, "l"
, "b"
, and "r"
indicates which side of guide legends should be collected. If NULL
, no guide legends will be collected. If waiver()
, it will inherit from the parent layout
A theme()
used to render the guides
,
title
, subtitle
, caption
, margins
, patch.title
, panel.border
, and
background
. If NULL
(default), will inherit from the parent layout
.
A single boolean value indicates whether to set the active
context to current plot. If TRUE
, all subsequent ggplot elements will be
added into this plot.
An single integer for the plot area order.
A string of the plot name. Used to switch the active context in
hmanno()
or stack_active()
.
The data input in ggheatmap
will be converted into the long formated data
frame when drawing. The default mapping will use aes(.data$.x, .data$.y)
,
you can use mapping
argument to control it. The data in the underlying
ggplot
object contains following columns:
.xpanel
and .ypanel
: the column and row panel
.x
and .y
: the x
and y
coordinates
.row_names
and .column_names
: A factor of the row and column names of
the original matrix (only applicable when names exist).
.row_index
and .column_index
: the row and column index of the original
matrix.
value
: the actual matrix value.
ggheatmap(1:10)
ggheatmap(letters)
ggheatmap(matrix(rnorm(81), nrow = 9L))
Run the code above in your browser using DataLab