Displaying 1 result from an estimated 1 matches for "motifx".
Did you mean:
motif
2010 Mar 06
1
color2D.matplot not giving colors
I am using color2D.matplot to plot a matrix about 400 by 200.
The values in the matrix are 0:5 and NA. The resulting plot is not color, but shaded b/w. I tried to figure out how to add colors, I would like something like c(blue, green, red, cyan, green)
#example
motifx <- matrix(NA, nrow=100,ncol=20)
motifx[,1:5] <- 1
motifx[,6:10] <- 2
motifx[,11:15] <- 3
motifx[,15:19] <- 4
motifx
color2D.matplot(motifx, na.color="white",show.legend=TRUE)
or is there a better function to use than color2D.matplot?
[[alternative HTML version deleted]]