r - plot rasterImage with different color palette and color scale -


I am trying to create a picture with

  m3 < - Matrix (rnorm (100), 10, 10) Plot (NA, type = "N", Eclaim = C (1, NC), Yil = C (1, NR), axis = FALSE, ASP = 1, xlab = "", Ylab = "") M3 and LT; - Abs (M3) / Max (AB3 (M3)) raster image (M3, xleft = 1, xright = nc, ybottom = 1, ytop = nr)  

Xright = nc, ybottom = 1, ytop = nr, interpolate = FALSE) image ( M3, useRaster = TRUE)

but I did not manage to work it

  Image (M3, Username = TRUE, col = "blue ")  

I also need a color scale like this

How do anyone know how to do with a function?

Here's a solution using the image .scale function:

  im & lt; - abs (matrix (rnorm (100), 10, 10)) mI & lt; - max (im, no. Rm = t rue) rm & lieutenant [is.na (rm)]  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -