Heatmaps


#1

It doesn’t look like there’s a way to control the mapping of color to scale in the R image function. It appears that yellow > red, but it would be nice to confirm. Can someone please comment on how this function relates color to scale? Thanks.


#2

You can supply most arguments accepted by the standard image function, in particular the ‘col’ argument. Here is an example that plots in black and white:

X = as.scidb(matrix(rnorm(100),nrow=10)) # Create a tiny example scidb array
image(X, col=c(0,1) )


#3

This is an R question rather than a SciDB one; you can look into the zlim argument of image(); alternatives (with legend!) are found in packages raster, fields, sp, and lattice::levelplot. These may all require data in a slightly different, often more sensible way.