make_heatmap: Make main heatmap part of plot for gghm.

View source: R/make_heatmap.R

make_heatmapR Documentation

Make main heatmap part of plot for gghm.

Description

Make main heatmap part of plot for gghm.

Usage

make_heatmap(
  x_long,
  plt = NULL,
  mode = "heatmap",
  include_diag = TRUE,
  invisible_diag = FALSE,
  border_lwd = 0.1,
  border_col = "grey",
  border_lty = 1,
  show_names_diag = TRUE,
  show_names_x = FALSE,
  show_names_y = FALSE,
  names_x_side = "top",
  names_y_side = "left",
  col_scale = NULL,
  size_scale = NULL,
  cell_labels = FALSE,
  cell_label_col = "black",
  cell_label_size = 3,
  cell_label_digits = 2,
  cell_bg_col = "white",
  cell_bg_alpha = 0,
  split_rows_names = FALSE,
  split_cols_names = FALSE,
  split_rows_side = "right",
  split_cols_side = "bottom"
)

Arguments

x_long

Long format data.

plt

A ggplot object to build onto. If NULL, makes a new plot.

mode

Plotting mode.

include_diag

Logical indicating if diagonal should be included.

invisible_diag

Logical indicating if an invisible diagonal should be included.

border_lwd

Border linewidth.

border_col

Border colour.

border_lty

Border linetype.

show_names_diag

Logical indicating if names should be displayed on the diagonal.

show_names_x

Logical indicating if names should be displayed on the x axis.

show_names_y

Logical indicating if names should be displayed on the y axis.

names_x_side

X axis side.

names_y_side

Y axis side.

col_scale

Scale for colour/fill aesthetic.

size_scale

Scale for size aesthetic.

cell_labels

Data frame of text to write on cells (processed by check_cell_labels).

cell_label_col

Colour of cell labels.

cell_label_size

Size of cell labels.

cell_label_digits

Number of digits for cell labels if numeric.

cell_bg_col

Cell background colour (fill).

cell_bg_alpha

Cell background alpha.

split_rows_names, split_cols_names

Logicals indicating if the facet names should be shown (if plot is built from scratch).

split_rows_side, split_cols_side

Sides to put the facet strips.

Value

ggplot object with heatmap component.


ggcorrheatmap documentation built on Aug. 25, 2025, 1:11 a.m.