[R] Lattice z colours when using formula class
Grace Garner
gxg627 at bham.ac.uk
Tue Oct 8 10:55:58 CEST 2013
Dear all,
I'm using Windows 7, R version 2.15.0 and lattice_0.20-6.
I'm plotting observed data in lattice using wireframe(). I have 3
matrices of observed values (Temp,Dist,Time) and I'm using the formula
method (Temp~Dist*Time).
How do I instruct wireframe to colour the plot surface based on the
heights of my z data (Temp) only?
At present I do not understand how the colours in the colourkey relate
to either my z, x or y data.
I include below my code:
mycols<-colorRampPalette(c("dodgerblue", "firebrick"), space="rgb")
wireframe(Temp~Dist*Time,
shade=F, drape=T, colorkey = T, col.regions=mycols(200),
col="transparent")
Thank you,
Grace
More information about the R-help
mailing list