[R] persp(), x- and y-axis with character strings

Pfaff, Bernhard Bernhard.Pfaff at drkw.com
Mon Nov 4 10:28:23 CET 2002

Dear R list,

I want to plot the yield curve in a 3D graph: the x-axis refers to time; the
y-axis refers to the maturities and the z-axis are the yields.

The following code works fine:

persp(y, x, as.matrix(ypper), xlab="Last 50 periods", ylab="Maturities
zlim=c(3,6),theta=130, phi=15, col="Seagreen", box=T, ticktype="detailed",
ltheta=270, lphi=30, r=sqrt(3), expand=.75, main="Historical yield curves")

Now, I want to replace the x- and y-axis with character strings, such that:

temp<-seq(ISOdate(1999,1,1), by="week", length=(nrow(yall)))
temp.ymd <-

the object 'temp.ymd' is presented on the x-axis and 


(another character string) is presented on the y-axis.

I know that one can supress the axes in persp(), but then I am struck by
adding them with axis() handish.

Any help?

If you have received this e-mail in error or wish to read our e-mail 
disclaimer statement and monitoring policy, please refer to 
http://www.drkw.com/disc/email/ or contact the sender.

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

More information about the R-help mailing list