plotCor: Red and Green Color Image of Correlation Matrix

Description Usage Arguments Author(s) See Also

View source: R/smaFunctions.R


This function produces a red and green color image of a correlation matrix using an RGB color specification. Increasingly positive correlations are represented with reds of increasing intensity, and increasingly negative correlations are represented with greens of increasing intensity.


plotCor(x, new=FALSE, nrgcols=50, labels=FALSE, labcols=1, title="", ...)



a matrix of numerical values.


If new=F, x must already be a correlation matrix. If new=T, the correlation matrix for the columns of x is computed and displayed in the image.


the number of colors (>= 1) to be used in the red and green palette.


vector of character strings to be placed at the tickpoints, labels for the columns of x.


colors to be used for the labels of the columns of x. labcols can have either length 1, in which case all the labels are displayed using the same color, or the same length as labels, in which case a color is specified for the label of each column of x.


character string, overall title for the plot.


graphical parameters may also be supplied as arguments to the function (see par). For comparison purposes, it is good to set zlim=c(-1,1).


Sandrine Dudoit, [email protected]

See Also

plotMat,rgcolors.func, cor, image, rgb.

WGCNA documentation built on Sept. 11, 2018, 9:03 a.m.

Related to plotCor in WGCNA...