[R] Grid on persp plot

Jesse Brown jesse.r.brown at lmco.com
Wed Oct 7 14:02:00 CEST 2009


I have a persp plot that I am generating which shows a growth trend 
toward the 'rear' of the displayed box. I would like to have grid lines 
visible on the plot to give a reference to the amount the values are 
I have tried rotating the plot 180 degrees to put the growth in the 
'front' of the box but then the underside of the mesh is shown and hides 
much of the other data. I have also tried using grid() but that only 
placed the lines on what would be the 2d space and didnt correspond to 
the displayed graph at all.
Is there a way to show grid lines within a persp plot?

For reference, these are the commands:

    x <- unique(data$X)
    y <- unique(data$Y)
    theta <- 23
    phi <- 10
    expand <- 0.5
    col <- "lightblue"
    shade <- 0.75
    ticktype <- "detailed"

    # ...
    persp (x,y,m.avg,theta=theta,phi=phi,

Thanks in advance,


More information about the R-help mailing list