Learn R Programming

PoolBal (version 0.1-0)

marHistHeatMap: Heatmap with marginal histograms

Description

Display a matrix using a heatmap with marginal histograms.

Usage

marHistHeatMap(
  mat,
  main = "",
  ylab = expression(eta),
  xlab = "lnD(a,w)",
  pal = NULL,
  histFill = adjustcolor("firebrick", 0.5),
  ...
)

Value

Plot the data using a heatmap and marginal histograms and return nothing.

Arguments

mat

numeric matrix to be plotted

main

title

ylab

y axis label

xlab

x axis label

pal

palette for heatmap

histFill

colour to fill histogram bars

...

additional arguments to image

Author

Chris Salahub

Details

This function accepts a matrix of values and plots the matrix with saturation/hue determined by a provided palette argument generated by colorRampPalette, for example. Marginal histograms summarizing the relative frequencies along both dimensions are also plotted to give a complete sense of the individual distributions alongside their joint distribution. This was designed to summarize the alternative distribution space summarized by altFrequencyMat, and the defaults reflect this.

Examples

Run this code
marHistHeatMap(altFrequencyMat(c(0, 2)))

Run the code above in your browser using DataLab