Re: [R] Adding points to a wireframe: 'x and units must have length >0' error

2011-10-24 Thread David Winsemius
On Oct 24, 2011, at 5:25 PM, Dennis Murphy wrote: Hi David: When I try your code, I get the wireframe with the x, y, z axes sans bounding cube and points, along with the error message Error using packet 1 object 'pts' not found Hi Dennis; My code was run with 2 objects, one named 'pts1' an

Re: [R] Adding points to a wireframe: 'x and units must have length >0' error

2011-10-24 Thread Megan Bartlett
Hi, I got the same result with David's version, but defining the *lim values prior to the function actually made it work. I also renamed the points pts so it wouldn't matter whether it was pts1 or pts. The new code is: data.frame(x = seq(-4, 0, 0.5), y = seq(0, 40, 5))-> df expand.grid(x = df$x

Re: [R] Adding points to a wireframe: 'x and units must have length >0' error

2011-10-24 Thread Dennis Murphy
Hi David: When I try your code, I get the wireframe with the x, y, z axes sans bounding cube and points, along with the error message Error using packet 1 object 'pts' not found > sessionInfo() R version 2.13.1 (2011-07-08) Platform: x86_64-pc-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=English

Re: [R] Adding points to a wireframe: 'x and units must have length >0' error

2011-10-24 Thread David Winsemius
On Oct 24, 2011, at 4:12 PM, Megan Bartlett wrote: > Hi David, > > Thanks for the suggestion - I changed pts1 to pts, but I still got > the same error as before. Do you know what else I'm doing wrong? I do not. The code that works for me is: wireframe(z ~ y*x, gridd, drape = TRUE, colorkey= T

Re: [R] Adding points to a wireframe: 'x and units must have length >0' error

2011-10-24 Thread Megan Bartlett
Hi David, Thanks for the suggestion - I changed pts1 to pts, but I still got the same error as before. Do you know what else I'm doing wrong? Thanks, Megan PS. New code is: wireframe(z ~ y*x, gridd, drape = TRUE, colorkey= TRUE, scales = list(arrows = FALSE), pts = pts1,

Re: [R] Adding points to a wireframe: 'x and units must have length >0' error

2011-10-24 Thread David Winsemius
On Oct 24, 2011, at 1:23 PM, Megan Bartlett wrote: Hi, I'm trying to follow the suggestions given by Deepayan Sarkar in this message: http://tolstoy.newcastle.edu.au/R/help/05/11/16135.html to plot 3-D points on a wireframe plot. The problem is that I keep getting a partly formed plot- wit

[R] Adding points to a wireframe: 'x and units must have length >0' error

2011-10-24 Thread Megan Bartlett
Hi, I'm trying to follow the suggestions given by Deepayan Sarkar in this message: http://tolstoy.newcastle.edu.au/R/help/05/11/16135.html to plot 3-D points on a wireframe plot. The problem is that I keep getting a partly formed plot- with the colored lattice visible but no axis labels or addit

Re: [R] adding points to a wireframe

2009-08-25 Thread Deepayan Sarkar
On Mon, Aug 24, 2009 at 4:27 PM, jebyrnes wrote: > > Hrm.  I have to admit, I don't entirely understand how to use the scaling, > and that seems like a lot of unneeded extra code.  It is what it is, though. That's true, and I think it would be easy enough to have a flag to panel.3dscatter etc. tel

Re: [R] adding points to a wireframe

2009-08-24 Thread jebyrnes
Hrm. I have to admit, I don't entirely understand how to use the scaling, and that seems like a lot of unneeded extra code. It is what it is, though. The documentation about scaling is somewhat obtuse. Do you have a clear explanation of what it is and how to use it in this instance? Perhaps e

Re: [R] adding points to a wireframe

2009-08-22 Thread Deepayan Sarkar
On 8/18/09, Jarrett Byrnes wrote: > A quick question. I'm trying to plot a surface from a fitted model along > with the original points, as in the following example: > > > df<-data.frame(expand.grid(100*runif(1:100), > 100*runif(1:100))) > df$Var3<-rnorm(length(df$Var1), mean=df$Var1*df$Var2, >

[R] adding points to a wireframe

2009-08-18 Thread Jarrett Byrnes
A quick question. I'm trying to plot a surface from a fitted model along with the original points, as in the following example: df<-data.frame(expand.grid(100*runif(1:100), 100*runif(1:100))) df$Var3<-rnorm(length(df$Var1), mean=df$Var1*df$Var2, sd=10) my.lm<-lm(Var3 ~ Var1*Var2, data=df) m