temp=cbind(runif(100),runif(100))
temp=cbind(temp,sqrt(temp[,1]^2+temp[,2]^2))
magplot(temp)
magplot(temp[,1:2],col=hsv(h=magmap(temp[,3])$map))
# A different mapping type:
magplot(temp[,1:2],col=hsv(h=magmap(temp[,3],type='rank')$map))
# Flipped:
magplot(temp[,1:2],col=hsv(h=magmap(temp[,3],flip=TRUE,type='rank')$map))
# Example of log mapping:
temp=cbind(temp,10^temp[,3])
magplot(temp[,1:2],col=hsv(h=magmap(temp[,4])$map))
magplot(temp[,1:2],col=hsv(h=magmap(temp[,4],log=TRUE)$map))
#Combination of mapping:
magplot(temp[,1:2],col=hsv(h=magmap(temp[,4],log=TRUE)$map),
cex=magmap(temp[,3],lo=0.5,hi=1,range=c(1,6),type='num')$map)
Run the code above in your browser using DataLab