2

I'm trying to make a persp3D plot but I can't figure out how to add dates on the x-axis. It only lets me change the lable of the axis, but I haven't found a way to get certain values on the axis.

persp3D(x= (1:iNumberOfDays),y= (1:iNumberOfVariables) ,z= zValue, xlab = "Time")

I also have a date vector vDates with iNumberOfDays elements which I would like to use on the x-axis as on any regular 2d lineplot or something.

vhu
  • 12,244
  • 11
  • 38
  • 48
  • 1
    You can use `persp()` way of setting labels, described here: http://entrenchant.blogspot.com/2014/03/custom-tick-labels-in-r-perspective.html and here https://stat.ethz.ch/pipermail/r-help/2006-July/109936.html and here http://stackoverflow.com/questions/17252702/3d-plot-in-r-better-visible-surface – Oleg Melnikov Mar 16 '16 at 02:42

1 Answers1

1

You can try to pass vDates to the x argument and set ticktype = "detailed" as follows:

persp3D(x=vDates, y=1:iNumberOfVariables, z=zValue, xlab="Time", ticktype="detailed")