On 2/12/2009 12:04 PM, Gilbert Brenes wrote:
Hi.
Is it possible to draw a contour plot (with contour or filled contour) or a
a surface plot (with persp or persp3d) with the z axis in a log scale?
For persp or persp3d I think you'd have to do the log transformation
yourself. For example,
x <- 1:100
y <- 1:100
z <- outer(x,y, function(x, y) exp(x/10 + y/10)
logz <- log(z, 10)
persp3d(x,y,logz, axes=FALSE, zlab="z", col="red")
axes3d(c("x", "y"))
axis3d("z", at=pretty(logz), labels=10^pretty(logz))
Duncan Murdoch
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.