[R] Fonts and axes using persp3d

Paul Simonin paul.simonin at uvm.edu
Fri Dec 11 15:22:13 CET 2009


Greetings,
 
  I am making 3D plots using persp3d, and would like to set z-axis 
limits and make axis labels (the automatic numbers at tick marks) bold. 
I have tried "zlim", but this does not seem to force the plot to 
restrain itself within certain bounds (e.g., 0-1). The surface I am 
plotting (z values) does contain some values outside the range I am 
setting. Maybe this overrides the "zlim"? Is there a way to fix this 
without manually removing negative z values?
  Also, is there any way to make the numerical axis labels bold, or 
generally darker or larger?

My code currently reads:

xtemp   <- 6:22
ylight  <- seq(from=-7.5, to=-5, by=0.5)
wDeltaT <- 0
code    <- 1
grid.tld <- expand.grid(temp=xtemp, logwm2=ylight, DeltaT=wDeltaT, 
code=code)               
YaoRasPred<-predict(YaoRas.Distribution.T.L.DT.gamm$gam,newdata=grid.tld,se.fit=T)

Rel.Dens <- matrix(YaoRasPred$fit, nrow=17 , byrow=F)   # use predict 
instead here
library(rgl)
persp3d(xtemp,ylight,Rel.Dens, 
zlim=c(min=0.0,max=0.032),xlab="",ylab="",zlab="",col="gray")




Thanks for any advice, and thanks again to Duncan Murdoch for suggesting 
persp3d for my purposes!

Sincerely,
Paul Simonin




More information about the R-help mailing list