Learn R Programming

henna (version 0.3.4)

tilePlot: Plot a numeric matrix or data frame

Description

This function plots a numeric matrix or data frame.

Usage

tilePlot(
  mat,
  title = "Tile plot",
  xLab = "x",
  yLab = "y",
  legendLab = "Value",
  sigDigits = 2,
  isCor = FALSE,
  labelSize = 3,
  labelColor = "black",
  tileBoundaryColor = "white",
  tileBoundaryWidth = 0.2,
  palette = "Spectral",
  reverseColors = TRUE,
  xAngle = 45,
  vJust = 0.6,
  ...
)

Value

An object of class gg.

Arguments

mat

A numeric matrix or data frame.

title

Plot title.

xLab

Label of x axis.

yLab

Label of y axis.

legendLab

Legend label.

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. Ignored if labelDF is NULL.

labelColor

Label color.

tileBoundaryColor

Tile boundary color.

tileBoundaryWidth

Tile boundary width.

palette

grDevices palette used for coloring nodes. Ignored if nodeColor is not NULL.

reverseColors

Whether to reverse the order of colors in the palette.

xAngle

Angle of x axis text.

vJust

Vertical justification in [0, 1].

...

Other 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