[R] color2D.matplot with anchored color scale

Phong Nguyen xphongvn at gmail.com
Fri Jul 10 04:22:20 CEST 2015


Hello Jim,

I have a several matrices stored in allGrid <- list()

I am using:

      color2D.matplot(grid, extremes = c("green", "red"), vcol = "black",
nslices = 60, show.legend=TRUE,axes=FALSE,show.values=TRUE,
xlab="Columns",ylab="Rows")

for each of "grid" in "allGrid". Each "grid" is a matrix with element range
from 0 to max number of allGrid, say 40.

I want to plot many "grid" with color represents the number (density). But
I cannot fix the color scale and anchor the maximum value to a fixed
number.

I have tried many things but nothing works.

Just the extra is: I cannot make the color from green (small number) ->
yellow (middle number) -> red (big number). Sometimes, the plot turns black
and white.

Please help me.

Phong

	[[alternative HTML version deleted]]



More information about the R-help mailing list