Generic convenience function to create a heatmap

heatmap_basic(
  data,
  x,
  y,
  fill,
  xLab = x,
  yLab = y,
  fillLab = fill,
  plotTitle = "Heatmap",
  fillScale = ggplot2::scale_fill_viridis_c(),
  theme = ggplot2::theme_minimal()
)

Arguments

data

A data frame

x, y, fill

The variables (columns) in data to use for the x axis, y axis, and fill of the heatmap, respectively.

xLab, yLab, fillLab

The labels to use for the x axis, y axis, and fill, respectively

plotTitle

The plot title.

fillScale

The fill scale.

theme

The theme.

Value

The heatmap, as a ggplot2 object.

Examples

rock::heatmap_basic(mtcars, 'am', 'cyl', 'mpg');