search for: 3dwire

Displaying 18 results from an estimated 18 matches for "3dwire".

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
2007 Sep 26
1
add points to wireframe
...0 with a dem<-(x,y,z, coordinates) (not provided). 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...
2011 Jan 03
4
how to invert the axes in the wireframe() plot
Dear List, I am using the wireframe function in the lattice package, and I am wondering if it is possible to invert the default axes orientation for x and y axes... what parameter should I look for? Best regards, Simone Gabbriellini
2009 May 05
2
Lattice: use levelplot as panel for wireframe
Hi, I want to draw a figure similar to http://dsarkar.fhcrc.org/lattice/book/images/Figure_13_07_stdBW.png from http://lmdvr.r-forge.r-project.org/figures/figures.html (figure 13.7) . However instead of using a contour plot as a panel for the wireframe I want to use a levelplot. Can somebody help me with this? Thanks in advance for any help, Kind regards, Anton Bossenbroek
2009 Aug 18
1
adding points to a wireframe
...=df) my.fun<-function(x,y) predict(my.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 wi...
2008 Apr 30
2
wireframe - add data points
...c,scales=list(arrows=TRUE),drape=TRUE, screen =list (x=15, y=-50, z=-105), pts = pts, panel.3d.wireframe = function(x, y, z, xlim, 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.scal...
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?
2011 Oct 24
1
Adding points to a wireframe: 'x and units must have length >0' error
...$y # plot wireframe(z ~ y*x, gridd, drape = TRUE, colorkey= TRUE, scales = list(arrows = FALSE), pts = pts1, panel.3d.wireframe = function(x, y, z,xlim, ylim, zlim, xlim.scaled, ylim.scaled, zlim.scaled, pts1, ...) { panel.3dwire(x = x, y = y, z = z, xlim = c(-4, 0), ylim = c(0, 40), zlim = c(-160, 0), xlim.scaled = c(-0.5, 0.5), ylim.scaled = c(-0.5, 0.5), zlim.sc...
2011 Mar 04
1
lattice: wireframe "eats up" points; how to make points on wireframe visible?
...5 pts <- rbind(c(pt.x, f(pt.x)-eps), c(pt.y, f(pt.y))) # points to add to the wireframe wireframe(z~x*y, pts=pts, aspect=1, scales=list(col=1, arrows=FALSE), panel.3d.wireframe = function(x,y,z,xlim,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, zl...
2008 Jul 27
1
Lattice wireframe: How to avoid drawing lines around polygons when using shade=TRUE
...ts and doesn't make sense in my application (think the plot of Maunga Whau--gridlines don't make sense). This does not happen when I display on the screen-- then I just get the surface as intended. I have tried everything from playing with trellis.par.set() to changing the code of panel.3dwire, but nothing seems to remove these gridlines. Any idea would be greatly appreciated. Best, Oliver
2011 Jun 11
0
To add cut-off points in surface response with lattice
...length=30) y <- seq(-1.95, 1.95, length=35) da <- expand.grid(x=x, y=y) da$z <- with(da, x*y^2) require(lattice) panel.3d.contour <- function(x, y, z, rot.mat, distance, nlevels = 20, zlim.scaled, ...) { add.line <- trellis.par.get("add.line") panel.3dwire(x, y, z, rot.mat, distance, zlim.scaled = zlim.scaled, ...) clines <- contourLines(x, y, matrix(z, nrow = length(x), byrow = TRUE), nlevels = nlevels) for (ll in clines) { m <- ltransform3dto3d(rbind(ll$x, ll$y, zlim.scaled[1]),...
2006 Mar 04
1
Controlling (number of) wires in wireframe
Hi, I would like to plot a wireframe (library: lattice) of the function f (x,y)=x*y where x and y are equally evaluated between 0 and 1. When one uses the option drape=TRUE then each "square" between the "wires" (lines that build the surface shape) gets a certain color. A perfect wireframe plot of a continuous surface would be, if you (almost) can not distinguish
2006 Oct 19
1
A question regarding Wireframe in Package Lattice
Hello, The following code produces a quadrilateral: q<-matrix(c(1,3,1,2,3,1,2,4,2,1,4,2),nrow=4,byrow=T) qc<-xyz.coords(q) wireframe(z~y*x,qc) I have 2 questions 1) How can i remove the bounding box i.e the cube encompassing the quadrilateral? 2) Is there any function to get the 2D coordinates of the quadrilateral actually used in the final plot ? I could manually
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]]
2013 May 16
1
Contour lines in a persp plot
Hello folks, i'm a R beginner and i want to put in a same plot both contour lines and persp plot. For example, fn<-function(x,y){sin(x)+2*y} #this looks like a corrugated tin roof x<-seq(from=1,to=100,by=1) #generates a list of x values to sample y<-seq(from=1,to=100,by=1) #generates a list of y values to sample z<-outer(x,y,FUN=fn) #applies the funct. across the combos of x
2012 Mar 15
1
coloring wireframe plot with independent/separate matrix of color values.
Dear R Users, I am trying to plot a matrix (a Digital Elevation Model) using wireframe [lattice] and color that matrix based on a separate/independent matrix of the same resolution (both have the same number of rows and columns) as the DEM. More specifically I would like to plot a DEM using wireframe and color each cell/tile based on interpolated surface temperature measurements. Within the
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))
2010 Apr 06
6
3-D response surface using wireframe()
I am working on plotting a response surface using wireframe(). The default style/orientation is z | | y | \ | \ | \ | \ | \ | \ | \ | \|________________x 0 Now what I want the orientation of axes is: z | | | |