search for: topoclr

Displaying 2 results from an estimated 2 matches for "topoclr".

2006 Jan 07
2
need palette of topographic colors similar to topo.colors()
...lues close to 0 (dark blue to light blue for negative values, green-yellow-brown for positive values) - the brown must get darker for higher positive values. topo.colors() fails both requirements and AFAICS lacks any options to control its behavior. #---unsatisfactory topo.colors() behavior topoclr <- function(tgt) { clr <- topo.colors(length(tgt)) clr <- clr[round(rank(tgt),0)] plot(tgt,pch=15,col=clr) } par(mfrow=c(2,1)) ; topoclr(-50:50) ; topoclr(-20:80) An acceptable solution would be something like this grayclr <- function(tgt) { tgt <- sort(tgt) ; neg...
2006 Jan 09
0
need palette of topographic colors similar to topo.colors ()
...blue for negative values, green-yellow-brown for > positive values) > - the brown must get darker for higher positive values. > > topo.colors() fails both requirements and AFAICS lacks any options to > control its behavior. > #---unsatisfactory topo.colors() behavior > topoclr <- function(tgt) > { > clr <- topo.colors(length(tgt)) > clr <- clr[round(rank(tgt),0)] > plot(tgt,pch=15,col=clr) > } > par(mfrow=c(2,1)) ; topoclr(-50:50) ; topoclr(-20:80) > > An acceptable solution would be something like this > grayclr <- f...