plot_heatmap: Heat map of a matrix or of a long data frame

View source: R/plot.R

plot_heatmapR Documentation

Heat map of a matrix or of a long data frame

Description

Heat map of a matrix or of a long data frame

Usage

plot_heatmap(
  data,
  x = NULL,
  y = NULL,
  value = NULL,
  annotate = FALSE,
  cmap = "RdYlBu",
  title = NULL
)

Arguments

data

Long data frame (with x, y and value), or a matrix / wide data frame such as cor(df) (then leave x, y and value empty)

x

Column for the columns of the heat map (month shows names)

y

Column for the rows

value

Column for the colour

annotate

Write the value in each cell

cmap

Diverging palette name from ggplot2::scale_fill_distiller()

title

Plot title

Value

ggplot object

Examples


plot_heatmap(cor(mtcars[, 1:4]), annotate = TRUE)


varunayan documentation built on Oct. 30, 2026, 1:07 a.m.