Displaying 2 results from an estimated 2 matches for "clrpos".
Did you mean:
clos
2006 Jan 07
2
need palette of topographic colors similar to topo.colors()
...(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 <- which(tgt < 0)
clrneg <- gray(0:length(tgt[neg])/length(tgt[neg]))
clrpos <- gray(length(tgt[-neg]):0/length(tgt[-neg]))
clr <- c(clrneg,clrpos)
plot(tgt,pch=15,col=clr)
}
par(mfrow=c(2,1)) ; grayclr(-50:50) ; grayclr(-20:80)
if only I could make gray() use blue/brown instead of black (I tried a
couple of things but got stuck again).
Any suggestions?
Than...
2006 Jan 09
0
need palette of topographic colors similar to topo.colors ()
...; }
> 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 <- which(tgt < 0)
> clrneg <- gray(0:length(tgt[neg])/length(tgt[neg]))
> clrpos <- gray(length(tgt[-neg]):0/length(tgt[-neg]))
> clr <- c(clrneg,clrpos)
> plot(tgt,pch=15,col=clr)
> }
> par(mfrow=c(2,1)) ; grayclr(-50:50) ; grayclr(-20:80)
> if only I could make gray() use blue/brown instead of black (I tried a
> couple of things but got stuck a...