[R] surface contour plot help

Duncan Murdoch murdoch at stats.uwo.ca
Wed Dec 17 05:30:33 CET 2008


On 16/12/2008 5:05 PM, Brad B wrote:
> I was able to get a surface plot with wireframe, however I cant rotate it around like you can with the plot3d function?
> Is thier a way to do this in R?

You are making your question impossible to answer, by not giving the 
right details.  If you show us code that uses wireframe to do what you 
want, surely someone could show you how to do the same thing in rgl.

That means putting together a small, self-contained example.  Don't post 
a vague description of your data and what you want, simplify your 
question to something we can see.

There are many ways to add a surface to a plot in rgl.  We have no idea 
which one would be appropriate for you.

Duncan Murdoch

>  
> 
> 
>  
> To: r-help at r-project.org
> Date: Tuesday, December 16, 2008, 9:13 AM
> 
> 
> 
> 
> 
> 
> 
> I am trying to do a surface profile plot.
> data is 
> X                  Y(1)             Z(1)
> 1-jan-02       2002        number
> 2-jan-02       2002        number
> .
> .
> .
> 1-jan-03       2003 (Y2)     number Z(2)
> 2-jan-03       2003 (Y2)     number Z(2)
> .
> .
> .
> until dec 31 2007.
>  
> I used the plot3d funtions to build a scatter point plot.
> Call rinterface.rrun("library(rgl)")
> Call rinterface.rrun("plot3d(x,y1,z1,xlab='Date',ylab='Year',zlab='Vol',ylim=c(2001,2008))")
> Call rinterface.rrun("plot3d(x,y2,z2,add=TRUE)")
> Call rinterface.rrun("plot3d(x,y3,z3,add=TRUE)")
> Call rinterface.rrun("plot3d(x,y4,z4,add=TRUE)")
> Call rinterface.rrun("plot3d(x,y5,z5,add=TRUE)")
> Call rinterface.rrun("plot3d(x,y6,z6,add=TRUE)")
>  
> Is thier a way to lay a surface to this?
>  
> 
> 
> 
>       
> 	[[alternative HTML version deleted]]
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list