Learn R Programming

henna (version 0.7.5)

tilePlot: Plot a numeric matrix or data frame

Description

This function plots a numeric matrix or data frame.

Usage

tilePlot(
  mat,
  title = NULL,
  xLab = NULL,
  yLab = NULL,
  legendTitle = "Value",
  palette = "Spectral",
  reverseColors = TRUE,
  sigDigits = 2,
  isCor = FALSE,
  labelSize = 3,
  labelColor = "black",
  legendTextSize = 10,
  legendTitleSize = 10,
  axisTextSize = 12,
  axisTitleSize = 12,
  tileBoundaryColor = "white",
  tileBoundaryWidth = 0.2,
  xAngle = 45,
  vJust = 0.6,
  ...
)

Value

An object of class gg.

Arguments

mat

A numeric matrix or data frame.

title

Plot title.

xLab

x axis label.

yLab

y axis label.

legendTitle

Legend title.

palette

Color palette.

reverseColors

Whether to reverse the order of colors in the palette.

sigDigits

Number of significant digits to be displayed for each matrix element.

isCor

Whether the matrix is a correlation matrix, in which case the limits of the color scale will be set to [-1, 1].

labelSize

Label size.

labelColor

Label color.

legendTextSize

Legend text size.

legendTitleSize

Legend title size.

axisTextSize

Axis text size.

axisTitleSize

Axis title size.

tileBoundaryColor

Tile boundary color.

tileBoundaryWidth

Tile boundary width.

xAngle

Angle of x axis text.

vJust

Vertical justification in [0, 1].

...

Additional arguments passed to centerTitle.

Examples

Run this code
mat <- matrix(round(runif(100, 0, 1), 2), nrow=10)
rownames(mat) <- paste0('R', seq(10))
colnames(mat) <- paste0('C', seq(10))
tilePlot(mat)

Run the code above in your browser using DataLab