multiHeatmap: Superfigure plots

View source: R/multiHeatmap.R

multiHeatmapR Documentation

Superfigure plots

Description

This function takes a list of matrices and plots heatmaps for each one. There are several features for the spacing (X and Y), colour scales, titles and label sizes. If a matrix has row and/or column names, these are added to the plot.

Usage

multiHeatmap(dataList, colourList, titles = NULL, main = "", showColour = TRUE, xspace = 1, cwidth = 0.5, ystarts = c(0.05, 0.9, 0.925, 0.95, 0.98), rlabelcex = 1, clabelcex = 1, titlecex = 1.2, maincex = 1.5, scalecex = 0.7, offset=.001)

Arguments

dataList

A list of matrices to be plotted as different panels

colourList

A list of colourscales (if length 1, it is copied for all panels of the plot)

titles

A vector of panel titles

main

A main title

showColour

logical or logical vector, whether to plot the colour scale

xspace

The space between the panels (relative to number of columns). This can be either a scalar or a vector of length(dataList)+1

cwidth

widths of the colour scales relative to the width of the panels

ystarts

A vector of length 5 of numbers between 0 and 1 giving the relative Y positions of where the heatmaps, colourscale labels, colour scales, panel titles and main title (respectively) start

rlabelcex

character expansion factor for row labels

clabelcex

character expansion factor for column labels

titlecex

character expansion factor for panel titles

maincex

character expansion factor for main title

scalecex

character expansion factor for colour scale labels

offset

small offset to adjust scales for point beyond the colour scale boundaries

Value

This function is called for its output, a plot in the current device.

Author(s)

Mark Robinson

Examples

library(gplots)

cL <- NULL
br <- seq(-3,3,length=101)
col <- colorpanel(low="blue",mid="grey",high="red",n=101)
cL[[1]] <- list(breaks=br,colors=col)
br <- seq(-2,2,length=101)
col <- colorpanel(low="green",mid="black",high="red",n=101)
cL[[2]] <- list(breaks=br,colors=col)
br <- seq(0,20,length=101)
col <- colorpanel(low="black",mid="grey",high="white",n=101)
cL[[3]] <- list(breaks=br,colors=col)

testD <- list(matrix(runif(400),nrow=20),matrix(rnorm(100),nrow=20),matrix(rpois(100,lambda=10),nrow=20))
colnames(testD[[1]]) <- letters[1:20]
rownames(testD[[1]]) <- paste("row",1:20,sep="")

multiHeatmap(testD,cL,xspace=1)

markrobinsonuzh/Repitools documentation built on March 20, 2024, 6:04 a.m.