View source: R/layout-heatmap-.R
heatmap_layout | R Documentation |
heatmap_layout
is a specialized version of quad_discrete()
, which
simplifies the creation of heatmap plots by integrating essential elements
for a standard heatmap layout, ensuring that the appropriate data mapping and
visualization layers are automatically applied. ggheatmap
is an alias for
heatmap_layout
.
heatmap_layout(
data = NULL,
mapping = aes(),
...,
width = NA,
height = NA,
filling = waiver(),
theme = NULL,
active = NULL
)
data |
Default dataset to use for the layout. If not specified, it must be supplied in each plot added to the layout. By default, it will try to inherit from
parent layout. |
mapping |
Default list of aesthetic mappings to use for main plot in the layout. If not specified, must be supplied in each layer added to the main plot. |
... |
Additional arguments passed to |
width , height |
The relative width/height of the main plot, can be a
|
filling |
A single string of For backward compatibility, a single boolean value is acceptable: By default, the classic heatmap color scheme
You can use the options
|
theme |
A |
active |
A |
A HeatmapLayout
object.
The data input will be converted to a matrix using fortify_matrix()
, and
the data in the underlying main plot will contain the following columns:
.panel_x
and .panel_y
: the column and row panel groups.
.x
and .y
: an integer index of x
and y
coordinates
.discrete_x
and .discrete_y
: a factor of the data labels (only
applicable when .row_names
and .column_names
exists).
.row_names
and .column_names
: A character 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.