I want to plot dates on the y-axis of a persp() plot. persp(x=1:30,y=days,y=yields) axis(2, 1:5, LETTERS[1:5]) does not work. On the mailinglist I found old messages, that said, that text() does not apply (yet) for 3-d plots. And the same question ( http://www.r-project.org/nocvs/mail/r-help/2002/9009.html ) was not answered. Perhaps this time? ;)
Thomas Steiner wrote:> I want to plot dates on the y-axis of a persp() plot. > > persp(x=1:30,y=days,y=yields) > axis(2, 1:5, LETTERS[1:5]) > > does not work. On the mailinglist I found old messages, that said, > that text() does not apply (yet) for 3-d plots. And the same question?persp points you to ?trans3d which is useful to calculate coordinates for calls to 2D functions such as text(). Uwe Ligges> ( http://www.r-project.org/nocvs/mail/r-help/2002/9009.html ) was not > answered. Perhaps this time? ;) > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> persp(x=1:4,y=1:6,z=sq3d,theta = 30, phi = 30, expand = 0.5, col = "lightblue") > > (but y=days....)of course it should be something like persp(y=as.Date(days, format="%Y-%m-%d"),x=1:4,z=sq3d, theta=30, phi=30, expand=0.5, ticktype="detailed", col="seagreen") But this does not what I expected (after my experience with plot above). ticktype="detailed" is better, but by far not the solution. How do I add date-lables to the x-Axis of a persp() plot? Who can help? Thanks... Thomas