Skip to content
Prev 319373 / 398506 Next

different color indicates difference magnitude

No sure what you want exactly as there is no attachment here.
Here are an example of what can be done:

x <- 1:128
y <- rnorm(128, 10, 2)

z <- x+y

nbcol <- heat.colors(128)

# standardize z to be from 1 to 128
zcol <-  ((z-min(z))/(max(z)-min(z)))*127+1

# different examples
plot(x, y, col=nbcol[zcol], pch=".", cex=10, bty="n")
plot(x, y, col=nbcol[zcol], pch=".", cex=zcol/10, bty="n")
plot(x, y, col=nbcol[128-zcol], pch=".", cex=10, bty="n")

Sincerly

Marc