Hi all,

I'm trying to plot a 3D graph using wireframe, and I want to colour the graph dependent on z axis values.  my z axis range is 0 - 2. Basically what I want is to colour from various points different colours. so say 1.4-2 would be blue, 0.4-1.4 red 0 - 0.4 green or whatever colours.


data.m = as.matrix(read.table("data.txt", sep='\t', header=T))[,-1]
library(lattice)
wireframe(data.m,aspect = c(0.3), shade=TRUE, screen = list(z = 0, x = -45), light.source = c(0,0,10), distance = 0.2,zlab="Freq",xlab="base",ylab="Fragment")


That is what I have so far, this just uses the rainbow colour, but i want to assign specific colours to specific regions. I have tried to look through the documentation but its not terribly clear to me.

Thanks for any help,  James


	[[alternative HTML version deleted]]

