[R] Plotrix Trick

Jan van der Laan djvanderlaan at gmail.com
Thu Jun 24 12:00:02 CEST 2010


Lorenzo,

You can also use a custom colorscale using color.scale and the
cellcolors option of color2D.matplot:

pdf("test_color_scale_logcolor.pdf")
oldpar<-par( mar = c(4.5,5, 2, 1) + 0.1,
 cex.axis=1.4,cex.lab=1.6,cex.main=1.6)
cellcolors <- color.scale(log(A),c(0.2,1),c(0.2,0.5),c(0,0))
color2D.matplot(A,main="Title",
 cellcolors=cellcolors,
 xlab = "",
 ylab="",
show.legend=TRUE,
 show.values=1,vcol="black",vcex=1, axes=FALSE)
box()
par(oldpar)
dev.off()

Regards,
Jan



More information about the R-help mailing list