Message-ID: <4A0AB875.2060402@bitwrit.com.au>
Date: 2009-05-13T12:09:25Z
From: Jim Lemon
Subject: plotting a grid with color on a map
In-Reply-To: <23514804.post@talk.nabble.com>
It was the NAs that fooled color2D.matplot. This gets your colors,
although not exactly what you want. Look at the help for color2D.matplot
to get that. I think fiddling with the x and y limits on the map() call
will get the positions right.
temp1<-read.table("time1test.dat",header=TRUE)
library(plotrix)
# reverse the row order, as color2D.matplot reverses it
color2D.matplot(temp1[36:1,],c(0.5,1),c(0.5,0),c(1,0),axes=FALSE)
# don't erase the above plot
par(new=TRUE)
# do a "ghost" plot with just the axes
plot(0,xlim=maplim[1:2],ylim=maplim[3:4],type="n")
# add the map on top in black
map(add=TRUE,col="black")
Jim