search for: 3dscatter

Displaying 20 results from an estimated 20 matches for "3dscatter".

2005 Nov 18
2
Adding points to wireframe
Hi, I am using function wireframe from package lattice to draw a 3D surface. I would like to add a few points on the surface. I read in a post from Deepayan Sarkar that "To do this in a wireframe plot you would probably use the panel function panel.3dscatter". Does someone have an example? When calling panel.3dscatter with only x, y and z arguments I get "argument "xlim.scaled" is missing, with no default". I do not know what value I should give to xlim.scaled. Ragards, Pierre-Luc
2009 May 13
2
3dscatter for linux
...ing is the fact that 'scatterplot3d' does not load under Ubuntu 8.10. Do you know any alternatives?? I tried cloud or persp but X,Y and Z axes are emprical in my case, and cannot be replaced by any seq(...). Thanks in advance, robert -- View this message in context: http://www.nabble.com/3dscatter-for-linux-tp23521603p23521603.html Sent from the R help mailing list archive at Nabble.com.
2010 Apr 06
1
lattice package: line end style
First, apologies for no example data but I don't think it's needed in this case, Q: Can (and if so how ) the line end style be changed for 'cloud' plots? I've tried par(lend=2), trellis.par.set(add.line = list(lend=2)) and much googling but to no avail Thanks in advance Dan P.S. the reason for this is that the round end looks bad at lwd=3 or more Daniel Alcock Malaria
2004 Jan 30
1
lines in 3d-cloud plot (lattice)
...: Two questions: 1) How do I connect points to get a line? > cloud(z~x*y,data=d,zlim=c(0,1)) # works > cloud(z~x*predict(l),data=d,zlim=c(0,1),type="l") # type="l" doesn't Warning message: type = l not implemented, consider using 'panel.3d.cloud = panel.3dscatter.old' in: panel.3d.cloud(x = x, y = y, z = z, rot.mat = rot.mat, za = za, help.search("panel.3d.cloud") also didn't report any hits. 2) How do I superimpose a second data set onto the same graph? (something equivalent to the sequence plot(), followed by points() or lines() in th...
2012 Feb 09
2
Lattice 3d coordinate transformation
...) for (ll in clines) { m <- ltransform3dto3d(rbind(ll$x-.5, ll$y-.5, zlim.scaled[1]), rot.mat, distance) panel.lines(m[1,], m[2,], col = add.line$col, lty = add.line$lty, lwd = add.line$lwd) } panel.3dscatter(x, y, z, rot.mat, distance, zlim.scaled = zlim.scaled, ...) } ) # But using levelplot: panel.3d.levels <- function(x, y, z,rot.mat, distance, zlim.scaled,...) { zz <- surf[[packet.number()]] n <- nrow(zz) s <- seq(-.5,.5,l=n) m <- ltransform3dto3d(rbind(re...
2007 Sep 26
1
add points to wireframe
...with follwing code I want to produce the wireframe and add some points on it: wireframe(z ~ x * y, data=dem, aspect = c(1, .5), scales = list(arrows = FALSE), panel.3d.wireframe = function(x, y, z,...) { panel.3dwire(x = x, y = y, z = z, ...) panel.3dscatter(x = x, y = y, z = z, data=ramm ...) }) 3d.scatter should give me the points into the wireframe from ramm: > ramm x y z 1 10.179 7.999 9.069 2 10.988 15.982 13.682 3...
2012 Feb 05
0
Lattice: correct use of ltransform3dto3d to plot a surface under a cloud ?
...<- by(d,d$g,function(D){ fit <- lm(z~poly(x,2)+poly(y,2),data=D) outer(seq(0,1,l=10),seq(0,1,l=10),function(x,y,...) predict(fit,data.frame(x=x,y=y))) }) ### require(lattice) # Modified code for plot 13.7 [changed: build clines from surf, -.5 for xy coords (why? don't know, works :), 3dscatter not wire] panel.3d.contour <- function(x, y, z,rot.mat, distance, zlim.scaled,nlevels=20,...) { add.line <- trellis.par.get("add.line") clines <- contourLines(surf[[packet.number()]],nlevels = nlevels) for (ll in clines) { m <- ltransform3dto3d(rbind(ll$x-.5,...
2011 Mar 04
1
lattice: wireframe "eats up" points; how to make points on wireframe visible?
...lim,ylim,zlim,xlim.scaled, ylim.scaled,zlim.scaled,pts,...){ panel.3dwire(x=x, y=y, z=z, xlim=xlim, ylim=ylim, zlim=zlim, xlim.scaled=xlim.scaled, ylim.scaled=ylim.scaled, zlim.scaled=zlim.scaled, ...) panel.3dscatter(x=pts[,1], y=pts[,2], z=pts[,3], xlim=xlim, ylim=ylim, zlim=zlim, xlim.scaled=xlim.scaled, ylim.scaled=ylim.scaled, zlim.scaled=zlim.scaled, type="p", col=c(2,3), cex=1...
2009 Nov 03
1
Two questions about cloud().
...;h"? I.e. of getting it to plot the points as points *and* drop a perpendicular line to the underlying plane? (2) Is there a way of telling cloud() to drop its lines to the floor of the bounding box, rather than to the plane z=0? I thought that the "zero.scaled" argument (for panel.3dscatter()) might be the ticket here, but when I pass this argument to cloud() I get an error ``Error using packet 1 formal argument "zero.scaled" matched by multiple actual arguments". Ta. cheers, Rolf Turner ###################################################################### Atten...
2009 Mar 31
1
3d cloud plot with point size reflecting variable value
Hello all, I'm using the cloud function to plot the iris data as per the document: http://www.stat.ucl.ac.be/ISpersonnel/lecoutre/stats/fichiers/_gallery.pdf I'd like to change the point size to reflect a fourth variable, as done here http://www.cis.hut.fi/projects/somtoolbox/download/pics2/shotvs2_origdata.png Does anybody know how to do this? There doesn't seem to be an option in
2009 Aug 18
1
adding points to a wireframe
...y.lm, data.frame(Var1=x, Var2=y), type="response") df2<-data.frame(expand.grid(x=seq(1,100,10), y=seq(1,100,10))) df2$z<-my.fun(df2$x, df2$y) wireframe(z ~ x*y, data=df2, col="grey", panel.3d.wireframe=function(x,y,z,...){ panel.3dwire(x = x, y = y, z = z, ...) panel.3dscatter(x=df$Var1, y=df$Var2, z=df$Var2, ...) }) Which I coded according to what I saw here: http://www.nabble.com/add-points-to-wireframe-td12901155.html http://www.nabble.com/wireframe---add-data-points-td16984174.html However, this plots the wireframe, then puts the error message: Error...
2003 Jan 15
1
lattice: cloud: aspect ratio, labels, vertical lines
I am interested to know how to make for clouds: - aspect ratio = 1 - labels attached to points - vertical lines from the points to the x/y base plane I tried: t = c( 'A', 'B', 'C', 'D' ) x = c( 100, 0, 200, 100 ) y = c( 0, 100, 0, 100 ) z = c( 80, 0, 20, 40 ) q = data.frame( x, y, z ) rownames( q ) = t print(cloud( z ~ x *
2004 Apr 26
3
Adding regression surface to cloud plot
Hello! I would like to add a plot of the regression surface to my cloud plot . Is it possible? Thanks Anne [[alternative HTML version deleted]]
2011 Oct 24
1
Adding points to a wireframe: 'x and units must have length >0' error
......) xx <- xlim.scaled[1] + diff(xlim.scaled) * (pts1$x - xlim[1]) / diff(xlim) yy <- ylim.scaled[1] + diff(ylim.scaled) * (pts1$y - ylim[1]) / diff(ylim) zz <- zlim.scaled[1] + diff(zlim.scaled) * (pts1$z - zlim[1]) / diff(zlim) panel.3dscatter(x = xx, y = yy, z = zz, xlim = xlim, ylim = ylim, zlim = zlim, xlim.scaled = xlim.scaled,...
2008 Apr 30
2
wireframe - add data points
...[1]) / diff(xlim) yy <- ylim.scaled[1] + diff(ylim.scaled) * (pts$y - ylim[1]) / diff(ylim) zz <- zlim.scaled[1] + diff(zlim.scaled) * (pts$z - zlim[1]) / diff(zlim) panel.3dscatter(x = xx, y = yy, z = zz, xlim = xlim, ylim = ylim, zlim = zlim, xlim.scaled = xlim.scaled,...
2009 Aug 26
0
Grid lines in cloud plot for lattice
Hi all, I was wondering if there was a way to draw out grid lines in the cloud plots for lattice. I hunted all throughout the panel.cloud and panel. 3dscatter help pages and couldn't find anything to help me move forward with this. Do I have to get deeper into the drawing commands, or is there something more obvious I'm just not seeing? My goal would be to place grid lines on the bottom face of the box and make drop lines to the grid. #...
2009 May 12
2
selecting points on 3D scatterplots
Hello Everyone, I am new to R and need some help. I have a matrix of x,y,z coordinates that I would like to interactively plot in 3D and then using the cursor select points on the plot and have the coordinates sent to a matrix. I am using the rgl package to plot the data at the moment because it allows me to rotate and zoom. I also tried cloud and scatterplot3D. I am looking for a function like
2007 Jul 05
2
Adding points to a wireframe with conditioning variable
I would like to add points to a wireframe but with a conditioning variable. I found a solution for this without a conditioning variable here, http://finzi.psych.upenn.edu/R/Rhelp02a/archive/65321.html. Does anyone know how to plot a wireframe conditioned on a variable and add the points conditioned on the same variable, similar to the solution at the link above?
2004 May 07
1
plotting planes and lines in wireframe()
Hi R-helpers I would like to plot some planes which are perpendicular to the x-y plane, such as x=y. Is there a way to do this in wireframe? I realize that I am not plotting a function of x, y since there are infinite number of z's that satisfy the above relation.... Hmm... Somewhat related, I would also like to plot a line in 3 d space... Finally, if you are feeling really brave, I
2010 Feb 20
1
Add lines (contours) to lattice wireframe plot
Hi, I draw a surface corresponding to bivariate density of independent variables (rho=0) using persp(). Then I add a contour line (i.e., circle in my case) at a particular density. Below is a minimal example of what I have so far. # Bivariate density dnorm2d <- function(x, y, rho = 0) { xoy = (x^2 - 2 * rho * x * y + y^2)/(2 * (1 - rho^2)) density = exp(-xoy)/(2 * pi * sqrt(1 - rho^2))