x<-matrix(rnorm(1024)+sin(seq(0,2*pi,length=1024)),nrow=32)
if(dev.interactive()) par(ask=TRUE)
color2D.matplot(x,c(1,0),c(0,0),c(0,1),show.legend=TRUE,
xlab="Columns",ylab="Rows",main="2D matrix plot")
# now do hexagons
color2D.matplot(x,c(1,0),c(0,0),c(0,1),show.legend=TRUE,
xlab="Columns",ylab="Rows",do.hex=TRUE,main="2D matrix plot (hexagons)")
par(ask=FALSE)
Run the code above in your browser using DataLab