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

[R] 3d plotting from a 2d array

2012-11-11 Thread Jake Roth
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 according to the surface's "z" values. I've tri

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

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

2011-12-29 Thread Paul Johnson
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 lecture on multicollinearity, which is by fa

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

[R] 3d plotting with cloud and wireframe

2011-07-21 Thread Benjamin Caldwell
Hi, I'm trying to plot an equation in two variables to get a feel for sensitivity to its parameters. I've run expand.grid to get made-up vectors of the combinations of the two independent variables, and am trying to plot the output of the dependent, M, against both the dependent in a 3d space. t

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

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

2011-06-08 Thread Oliver
Hello, say I have a 2D-matrix (indexed by x and y), which contains z values, which I want to plot over x-y. Either dotted, or if possible as a landscape. I tried around with persp and plot3d (from rgl) and persp3d (from rgl). I sometimes get something that looks good and a while later, when try

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

[R] 3d plotting

2007-12-18 Thread Brad B
I am trying to dp a 3d plot. I tried persp but my data is not a matrix. the 3dplot function returns this error, (list) object cannot be coerced to 'double' heres my code, td<-read.csv("td.csv", header=TRUE) price<-read.csv("price.csv", header=TRUE) contractdate<-read.csv("contractdate.csv"