Skip to content
Prev 25078 / 398502 Next

negative and positive values in diff. colors

I found that (0.1,0.5) was a bit small for a point-size range so I used 
(0.5,2.5), but otherwise I think this does what you want. 

n <- 20
x <- runif(n)
y <- runif(n)
z <- 2*runif(n)-1

cex.min <- 0.5
cex.max <- 2.5
plot(x,y,pch=ifelse(z>0,1,20),cex=cex.min+((z-min(z))/(max(z)-min(z)))*(cex.max-cex.min))



On
Thu, 7 Nov 2002, Rado Bonk wrote: