Re: [R] 3d plotting from a 2d array

2012-11-11 Thread Duncan Murdoch
On 12-11-11 7:08 PM, Jake Roth wrote: Hi, I'm new to R and am learning the ropes of r-help and programming. I'm attempting to plot a 2-D mesh in 3-D using the persp function. I've positioned the graph using phi and theta, but I'm having trouble overlaying color onto the actual surface accordin

Re: [R] 3d plotting alternatives. I like persp, but regret the lack of plotmath.

2011-12-29 Thread Duncan Murdoch
On 11-12-29 1:01 PM, Paul Johnson wrote: I have been making simple functions to display regressions in a new package called "rockchalk". For 3d illustrations, my functions use persp, and I've grown to like working with it. As an example of the kind of things I like to do, you might consult my l

Re: [R] 3d plotting alternatives. I like persp, but regret the lack of plotmath.

2011-12-29 Thread David Winsemius
I'm not sure it is entirely responsive to the request, but I did hash out a way to add axis labels to car::scatter3d plots. There a worked example on SO: http://stackoverflow.com/questions/8204972/carscatter3d-in-r-labeling-axis-better/8206320#8206320 The SO screenshot won't show that fact t

Re: [R] 3d plotting with cloud and wireframe

2011-07-21 Thread Dennis Murphy
Hi: This worked for me: t <- 0:100 DBH <- 10:100 TxDBH<-expand.grid(t, DBH) rm(t, dbh) time<-TxDBH[,1] dbh<-TxDBH[,2] M <- 4000*(1-exp(-time*(1.104-(0.67*0.7)-0.163*log(dbh))^2)) df <- data.frame(time, dbh, M) library('lattice') wireframe(M ~ time + dbh, data = df) # Check the versions of R and

Re: [R] 3D-plotting a 2D-matrix that contains z-values (3rd dimension)

2011-06-09 Thread oliver
On Thu, Jun 09, 2011 at 01:50:17PM +0200, Uwe Ligges wrote: > > > On 09.06.2011 13:37, oliver wrote: > >On Thu, Jun 09, 2011 at 11:22:54AM +0200, Uwe Ligges wrote: > >>Well, > >> > >>persp(x, y, z) does exactly what you asked for: it plots tha matrix > >>z along the values given by the vectors x

Re: [R] 3D-plotting a 2D-matrix that contains z-values (3rd dimension)

2011-06-09 Thread Uwe Ligges
On 09.06.2011 13:37, oliver wrote: On Thu, Jun 09, 2011 at 11:22:54AM +0200, Uwe Ligges wrote: Well, persp(x, y, z) does exactly what you asked for: it plots tha matrix z along the values given by the vectors x and y. But I don't have these vectors x and y, so I have to create them just to

Re: [R] 3D-plotting a 2D-matrix that contains z-values (3rd dimension)

2011-06-09 Thread oliver
On Thu, Jun 09, 2011 at 11:22:54AM +0200, Uwe Ligges wrote: > Well, > > persp(x, y, z) does exactly what you asked for: it plots tha matrix > z along the values given by the vectors x and y. But I don't have these vectors x and y, so I have to create them just to call persp(). And persp also need

Re: [R] 3D-plotting a 2D-matrix that contains z-values (3rd dimension)

2011-06-09 Thread Uwe Ligges
Well, persp(x, y, z) does exactly what you asked for: it plots tha matrix z along the values given by the vectors x and y. If you need to calculate z values from x and y using some function foo, outer(x, y, foo) is typically your friend. Uwe Ligges On 08.06.2011 16:57, Oliver wrote: Hel

Re: [R] 3d plotting

2007-12-18 Thread Brad B
that worked. however Im trying to get a surface countour like persp() would show. Since I dont have a matrix data set, I assumed that the wireframe function would do. since I get an error using wireframe, no applicable method for "wireframe" I am using this plot3d. I was under the impres

Re: [R] 3d plotting

2007-12-18 Thread Scionforbai
> 60,000 I hope that you actually haven't got any comma to separate the thousands... it separates fields in a csv files (as the "Comma Separated Values" name may suggest). If so, get rid of the commas. > the 3dplot function returns this error, > (list) object cannot be coerced to 'double' > t