I am plotting some surfaces in R using the lattice package. I can't find a way to choose the colours of the surface. Here is an example:
Here is an example of how i plot each:
theseCol=heat.colors(150)
mm=paste("WB numbers where present
(",nstoch," sims)",sep="")
WBnumbers=wbPrev_series
rownames(WBnumbers)=KList
colnames(WBnumbers)=iMwbList
wireframe(WBnumbers, zlim=c(0,max(wbPrev_series,na.rm=TRUE)), colorkey=FALSE,
col.regions=theseCol, scales = list(arrows = FALSE), drape = TRUE,
main=mm, zlab="", xlab="K", ylab="iMwb")
I would like for the first surface to be as it is, but for the others to be coloured not by their z levels but by the 1st surface's z levels. I tried multiple things but wireframe always accepts the colours i give as the possible ranges for the current variable.
Anyway this could be done? Thanks
See Question&Answers more detail:os