limma (version 3.28.14)

plotDensities: Plot Expression Densities


Plot the density of expression values for multiple arrays on the same plot.


"plotDensities"(object, log=TRUE, group=NULL, col=NULL, main="RG Densities", bc.method="subtract", ...) "plotDensities"(object, log=TRUE, group=NULL, col=NULL, main="RG Densities", ...) "plotDensities"(object, log=TRUE, bc.method="subtract", ...) "plotDensities"(object, log=TRUE, ...) "plotDensities"(object, group=NULL, col=NULL, main=NULL, legend="topleft", ...)


an RGList, MAList, EListRaw or EList object containing expression data. Or any data object that can be coerced to a matrix.
logical, should densities be plotted on the log2 scale?
optional vector or factor classifying the arrays into groups. Should be same length as ncol(object).
optional vector of colors of the same length as the number of groups.
the main title for the plot.
background subtraction method passed to backgroundCorrect.
character string giving position to place legend. See legend for possible values. Can also be logical, with FALSE meaning no legend.
other arguments are passed to plotDensities.default or density.



This function is useful to display and contrast the distribution of expression values on different arrays. It can for example be used to display the effects of between-array normalization. See the section on between-array normalization in the LIMMA User's Guide.

See Also

An overview of diagnostic plots in LIMMA is given in 09.Diagnostics. There is a section using plotDensities in conjunction with between-array normalization in the LIMMA User's Guide.

This function uses density and matplot.


Run this code
## Not run: 
# #  Default is to plot red channels in red and green channels in green
# plotDensities(MA)
# #  Alternatively colors
# plotDensities(MA, col=c("red","blue"))
# #  Color by group, with three groups:
# plotDensities(MA,group=group,col=c("blue","orange","green"))
# ## End(Not run)

Run the code above in your browser using DataCamp Workspace