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:
Hi R-users, I have a set of elevation residuals as geodata points. I would like to display them in the following way: -negative values using pch=20 (filled circle) -positive values using pch=1 (empty circle) while using the cex.max=5, cex.min=0.1 for points() to represent the residuals value. Basically I would like to distinguish neagtive and positive values at my map. How to do this. Thanks in advance, Rado
318 Carr Hall bolker at zoo.ufl.edu Zoology Department, University of Florida http://www.zoo.ufl.edu/bolker Box 118525 (ph) 352-392-5697 Gainesville, FL 32611-8525 (fax) 352-392-3704 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._