Skip to content

axis labels and ticks in persp

2 messages · Bill Simpson

#
1. This doesn't work
persp(x,y,z,col="grey",xlab="x",ylab="y",zlab="z")
but I can get axis lables on x and y by
persp(x,y,z,col="grey")
title(xlab="x", ylab="y")
BUT I can't figure out how to get a label for z. How to do it?

2. To be be consistent with image(), I think persp should make z the axis
it now calls y (and vice versa). By this I mean that image() is just a
view of the same object except from exactly overhead (on the z axis), and
this z axis is called y by persp.

3. How can I get ticks and associated tick labels on all the axes as is
done by default by plot(x,y) or image(x,y,z)?

Thanks very much for any help!

Bill Simpson

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Sorry, I see now that this behaviour is caused by
title(ylab="y")
which just puts the y-axis label in the wrong place for a 3D plot
(persp's z-axis). So this method of adding axis labels doesn't work very
well for persp() plots.

Bill

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._