Adds an additional main heatmap to an iheatmap object
# S4 method for IheatmapHorizontal,matrix
add_main_heatmap(
p,
data,
name = "Signal",
x = default_x(data),
colors = pick_continuous_colors(zmid, zmin, zmax, p),
colorbar_position = get_colorbar_position(p),
show_colorbar = TRUE,
zmin = min(data, na.rm = TRUE),
zmax = max(data, na.rm = TRUE),
zmid = 0,
col_order = NULL,
x_categorical = NULL,
side = c("right", "left"),
size = 1,
buffer = 0.04,
text = signif(data, digits = 3),
tooltip = setup_tooltip_options(),
xname = NULL,
pname = name,
...
)# S4 method for IheatmapVertical,matrix
add_main_heatmap(
p,
data,
name = "Signal",
y = default_y(data),
colors = pick_continuous_colors(zmid, zmin, zmax, p),
colorbar_position = get_colorbar_position(p),
show_colorbar = TRUE,
zmin = min(data, na.rm = TRUE),
zmax = max(data, na.rm = TRUE),
zmid = 0,
row_order = NULL,
y_categorical = NULL,
side = c("bottom", "top"),
size = 1,
buffer = 0.04,
text = signif(data, digits = 3),
tooltip = setup_tooltip_options(),
yname = NULL,
pname = name,
...
)
Iheatmap-class
object, which can be printed to generate
an interactive graphic
Iheatmap-class
object
matrix
name of colorbar, will determine if colorbar is shared with existing plot
x axis labels (by default rownames of data); only used if orientation is horizontal
color palette name or vector of colors
colorbar placement
display the colorbar?
minimum for colorscale
maximum for colorscale
midpoint for scale
column ordering for this heatmap; only used if orientation is horizontal
is x categorical? will guess if not provided
which side of the current plot to add this heatmap?
relative size of plot. size relative to first heatmap
amount of space to leave empty before this plot, relative to size of first heatmap
text of value to display for data
tooltip options, see setup_tooltip_options
internal name for x axis
internal name for plot
additional arguments (ignored)
y axis labels (by default colnames of data); only used if orientation is vertical
row ordering for this heatmap; only used if orientation is vertical
is y categorical? will guess if not provided
internal name for y axis
Alicia Schep
iheatmap
, main_heatmap
mat <- matrix(rnorm(20), ncol = 5, nrow = 4)
mat2 <- matrix(rnorm(24), ncol = 6, nrow = 4)
hm <- iheatmap(mat) %>% add_main_heatmap(mat2)
# Print heatmap if interactive session
if (interactive()) hm
Run the code above in your browser using DataLab