View source: R/general.purpuse.utilities.R
plotColorAnn | R Documentation |
Plots annotation in margins, supposed to be used with image (or imageWithText)
plotColorAnn(
centers,
labs,
cex = 0.7,
cols = NULL,
horis = FALSE,
spacer = 0.1
)
centers |
coordinates along dimension to be annotated (centers) |
labs |
list of character vectors of labels or matrix of columns. Each item in the list results in one annotation. List names will be used to label annotation. |
cex |
width (in lines) of each annotation (0.7 is default) |
cols |
list of named color vectors specifying colors for each label, should have same length as labs. Generated by char2col if NULL |
horis |
logical, whether annotation should be horizontal or vertical |
spacer |
spacer (in lines) between plot and annotation |
par(mgp=c(3,2,1.5))
image(1:5,1:2,matrix(1:10,ncol=2))
plotColorAnn(1:5,list(a1=c(1,1,2,3,3),a2=c('a','b','a,','b','a')),horis=T)
plotColorAnn(1:2,cbind(y1=c(1,2),y2=c('a','a')),horis=F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.