Description Usage Arguments Details Value
Plots a color bar
1 |
C |
An arbitary maximum for the colour scale |
sz |
Scaling of bin pixels |
color.bar <- function(C,sz) {
#New scale bar plot:
scalebar=1:C
scalebar=2^(seq(log2(1), log2(C), length.out = 50))
scalebar2=tail(scalebar,-1)
scalebar=head(scalebar,-1)
#plot:
plot(5,5,pch=15,cex=sz*1, type="n",las=2, log="y", xlim=c(0,10), ylim=c(1,C), xaxt="n",xlab=NA, ylab="Interaction freq per 10 million pairs",at=c(1,2,5,10,20,50,100,200,500,1000,2000,5000,10000))
rect(rep(1, length(scalebar)),scalebar,
rep(9, length(scalebar)),scalebar2,pch=15,cex=sz*1, col=r*log2(scalebar),border = r*log2(scalebar))
}
A color bar
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.