Hi all,

I hope someone can help me with this.

Given,

library(fields)
x <- array(rnorm(100),dim=c(50,50))
image.plot(x)

I want to change the range in the color bar so that the range is from -1 to 1. I did adjust the image.plot() command to

image.plot(x,zlim=c(-1,1))

but the image shows white spaces.

How can I set the the color scale such that values which are less than - 1 are assigned a color e.g. blue and those which are more than 1 are assigned red.

In essence, how do I make the color scale to reflect the a certain band of values i.e.

color 1 = > 1
color 2 =  0.9 to 1
color 3 = 0.8 to 0.9
...
color 8 = -0.8 to -0.9
color 9 = -0.9 to -1
color 10  = < -1


Muhammad

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to