Dear R Users,

I am trying to plot a matrix (a Digital Elevation Model) using wireframe
[lattice] and color that matrix based on a separate/independent matrix of
the same resolution (both have the same number of rows and columns) as the
DEM.  More specifically I would like to plot a DEM using wireframe and
color each cell/tile based on interpolated surface temperature
measurements.  Within the wireframe function, the arguments
"color.regions", "drape" and "at" seemed most important to accomplish
this.  However, I have not been successful.  Below is another explanation
with some example data.

###

#say we have a matrix

DEM=matrix(1:100, ncol=10)

#we also have a matrix of interpolated temperatures measurements (or any
other kind of data with the same resolution as the DEM)

interpTEMP = matrix(floor(runif(100, 1,10)),ncol=10)

#I would normally go through and apply a function to use html color codes
to coincide with interpTEMP but these values will prove my dilemma.

#now I would like to plot my DEM and color each cell based on the
"matching" cell of interpTEMP
#N.B. that this obviously isn't the correct way of doing things as it
doesn't work!

wireframe(x=DEM, drape=TRUE, col.regions=as.vector(interpTEMP))

###

any ideas on how to combat this problem?  Please let me know if I need to
be more clear or provide additional information.  Many blessings for your
help!

.alex

	[[alternative HTML version deleted]]

