search for: points3d

Displaying 20 results from an estimated 50 matches for "points3d".

2007 Aug 13
2
help with scatterplot3d
...f points using the following code: >my.3dplot<-scatterplot3d(my.coords, pch=19, zlim=c(0,1), scale.y=0.5, angle=30, box=FALSE) where my.coords is a data frame that contains x, y, and z coordinates for grid points whose elevation we sampled. The problem occurs when I try to add points using points3d. I tried to follow the code in the examples of the package pdf. First, I tried the following code to add all of the points that I wanted: >my.3dplot$points3d(seq(400,600,0.19), seq(600,400,0.295), seq(800,500,0.24), seq(1000,1400,0.22), seq(1200,600,0.24), seq(1200,1500,0.28), seq(1300,1400,0...
2012 Dec 07
1
points3d and ordirgl
...oints or scores created using a function such as metaMDS or nmds) that is recognized by points or scores dim1 = dimension 1 (e.g., 1) dim2 = dimension 2 (e.g., 2) dim 3 = dimension 3 (e.g, 3 e.g., > identify.rgl(row.names(vegmat),veg_nmds$points,1,2,3) My issue is that I would like to use the points3d function to add points of different colors and sizes to the dynamic 3D plot created by using ordirgl. In my case the different colored and sized points represent different clusters from the results of the Partitioning Around Mediods (pam) clustering function (from library cluster). I have used thi...
2008 May 13
1
3dscatterplot -different colors for different factors of the same variable
...d but it didn't work out is: 1) Plotting only one set of points (the green one) s3d<-scatterplot3d(greenpts[,3],greenpts[,2],greenpts[,4],type="p",scale.y=4, angle=10, color="green") and try to overlay the others (as you normally would do with "plot"): s3d$points3d(redpts[,3],redpts[,2],redpts[,4],col="red",type="o") s3d$points3d(yellowpts[,3],yellowpts[,2],yellowpts[,4], col="yellow",type="o") s3d$points3d(bluepts[,3],bluepts[,2],bluepts[,4],col="blue",type="o") s3d$points3d(pinkpts[,3],pinkpts[,2],...
2011 Jul 29
2
change pch in 3dplot, export graph
..., pos=4) plot3d(subset(Dataset$PC1, source=="ashe_amphib"), subset(Dataset$PC2, source=="ashe_amphib"), subset(Dataset$PC3, source=="ashe_amphib"), xlim=c(-5,7), ylim=c(-5,3), zlim=c(-4,7), xlab="PC1", ylab="PC2", zlab="PC3", col=1, pch=1) points3d(subset(Dataset$PC1, source=="ashe_ZAS"), subset(Dataset$PC2, source=="ashe_ZAS"), subset(Dataset$PC3, source=="ashe_ZAS"), col=2, pch=2) points3d(subset(Dataset$PC1, source=="earlies_gap"), subset(Dataset$PC2, source=="earlies_gap"), subset(Dataset$...
2010 Apr 05
1
Using pch with the RGL library
Hi, I am trying to compare two 3D plots. For that, I am trying to use the "pch" parameter in the "points3d" function, but it is not working. Is it implemented? Any suggestion? Here goes a reproducible code. I wanted the second plot having different symbols for the points. x <- rbind(matrix(rnorm(100, sd = 0.3), ncol = 2), matrix(rnorm(100, mean = 1, sd = 0.3), ncol = 2),...
2006 Jun 29
3
advice on arguments
...different sets of arguments, I can't just use "..." ; I did write some code a while ago that would look at formals() to dissect out arguments that should be passed to the different functions, but it seemed overly complex. The particular case I have now is a little simpler. foo2 (points3d) and foo3 (spheres3d) are both functions from the rgl package that pass arguments such as color, alpha, etc. along to an rgl.material() command with lots of possible arguments. (The function may also call segments3d or lines3d, but these all have the same arguments as points3d.) However, to change...
2007 Apr 03
1
which points within an ellipsoid? Sorting data in 3d
...radius)*sin(alpha*pi/180) z <- z.coord.point+(z.radius.multiplier*radius)*cos(alpha*pi/180)*cos(beta*pi/180) # using rlg to visualize the mock-data and the ellipsoid plot.lim <- c(-20,20) plot3d(x, y, z, xlim = plot.lim, ylim = plot.lim, zlim = plot.lim ) points3d(data.1, col ="green", size = 6) points3d(data.2, col ="red", size = 6) points3d(data.3, col ="blue", size = 6) __________________________________________ Kim Milferstedt University of Illinois at Urbana-Champaign Department of Civil and Environmental Engineering 4125...
2004 Oct 26
1
persp(), scatterplot3d(), "..." argument
...use scatterplot3D quite a lot. I am trying to modify persp() to plot scatterplots, and make use of the theta and phi arguments that persp() offers. I am having some difficulty passing the correct arguments to persp(). Here is my function so far. Much of it is copied from the persp() manpage. points3d <- function(x,y,z, jj.colour="black", ...){ if(is.matrix(x)){ z <- x[,3] y <- x[,2] x <- x[,1] } z.grid <- matrix(range(z),2,2) persp(range(x), range(y), z.grid, col = NA,border=NA, ...) -> res trans3d <- function(x,y,z, pmat...
2004 Oct 26
1
persp(), scatterplot3d(), "..." argument
...use scatterplot3D quite a lot. I am trying to modify persp() to plot scatterplots, and make use of the theta and phi arguments that persp() offers. I am having some difficulty passing the correct arguments to persp(). Here is my function so far. Much of it is copied from the persp() manpage. points3d <- function(x,y,z, jj.colour="black", ...){ if(is.matrix(x)){ z <- x[,3] y <- x[,2] x <- x[,1] } z.grid <- matrix(range(z),2,2) persp(range(x), range(y), z.grid, col = NA,border=NA, ...) -> res trans3d <- function(x,y,z, pmat...
2011 Oct 31
1
3D Graph Surface and single points (eg wireframe with points)
...tice) library(scatterplot3d) #data d <- expand.grid(x = 1:10, y = 5:15) d$z <- sqrt((d$x-4)^2 + (d$y-10)^2) wireframe(z ~ x * y, data = d, drape=T) # How to plot points?? ????????????? scatterplot3d(d$x, d$y, d$z) # How to plot nice surface? # How to rotate point of view by z axis? # BTW: points3d should add some points (does not work for me) # persp3d no example ? ? Can anybody help? Has anybody such an example? ? Actually, I think it is possible with R to dray such 3D plots - the question is how? Even possible to animate the 3D plot? Or rotate interactive? ? ? Best regards Karl
2007 Feb 21
1
Installing Package rgl - Compilation Fails - FreeBSD
...t;> >> h. >> >> * checking examples ... ERROR >> Running examples in 'rgl-Ex.R' failed. >> The error most likely occurred in: >> >>> ### * 3dobjects >>> >>> flush(stderr()); flush(stdout()) >>> >>> ### Name: points3d >>> ### Title: add primitive set shape >>> ### Aliases: points3d lines3d segments3d triangles3d quads3d >>> ### Keywords: dynamic >>> >>> ### ** Examples >>> >>> # Show 12 random vertices in various ways. >>> >>> M &lt...
2012 Jun 12
4
How do I connect dots in the RGL package?
Hi all, I just started using the rgl package in R, and I need to know how I connect the dots I created. A simple line from one co?rdinate (x0,y0,z0) to another (x1,y1,z1) will do. I tried using the code rgl.lines, but it doesn't accept lines that don't stem from O (0,0,0). Please help! Thanks! -- View this message in context:
2008 Apr 11
1
polygons on scatterplot3d
...apdata # coast<-list() # coast$x<-c(-70.5,-70.5,-70,-70) # coast$y<-c(41.2,43,43,41.2) lat<-c(41,41.5,42,42.5,43) long<-c(-71,-69.5,-70,-70.2,-69.8) weight<-c(80,20,30,30,10) p3d<-scatterplot3d(long, lat, weight, angle=75, type='h', box=FALSE, asp=1, grid=FALSE) p3d$points3d(coast$x,coast$y,rep(0, length(coast$x)), type='l', col='gray') # Now how to fill this polygon...? Cheers, Jon Mac OS 10.5 R 2.6.2 Intelligence Finite Jon Loehrke Graduate Research Assistant Department of Fisheries Oceanography School for Marine Science and Technology Universi...
2011 Oct 29
0
Redundancy canonical analysis plot problem in 3D using VEGAN
...I am not able to add " species scores " from RDA results in 3D plot like i can in 2D plot. With the code i used , i get errors like ; ERROR dans t$sites : $ operator is invalid for atomic vectors, Erreur dans match.arg (display, items) : 'arg' should be one of ?xyz.convert?, ?points3d?, ?plane3d?, ?box3d?, ?points?, ?arrows? I saw that I can use other functions, but it is impossible to extract the 3D scores ( and add species to 3d plot ), Other fonctions works but, add elements in a 2D space. How can I add the "species scores" (sites and arrows are added correctly)...
2002 Mar 18
2
persp(): add second plane (second, long question)
Thank you for your replies so far. Sorry for bothering you again, but I'm still not able to get what I need as I don't understand all parts of the replies (just using R for easy things....). Is there a code for plane3d() like some of you sent me for points3d()? I was not able to get that out of the scatterplot3d package... What I can do is to get the x,y and z-range for the xlim,ylim and zlim so that the two planes would fit the box (x and y values are the same for both (1x6vectors)). And I'm able to store the z-values in two different matrices (...
2002 Jul 03
2
grouping in scatterplot3d
Hi all, I've been using the scatterplot3d function (from the scatterplot3d library) to create 3D plots. I was wondering whether there is anyway to group the points according to a particular group variable. For example I used the plot function as plot( factor( <GROUPINGVAR> ) , <PLOTVARS> ) to organise the results in a according to the grouping variable. I was wondering
2006 Apr 18
1
adding lines to scatterplot3d
...ally use R for simple 2D graphs so now I cannot solve the following problem (which I suppose very simple too). I'm using scatterplot3d. I want to add dotted lines parallel to the 3 axes, in order to create a sort of cage in the 3D box (so to represent subdomains in my dataspace). I saw that points3d can be used to draw points or lines to the existing plot but actually I'm able only to draw points (I grabbed an example from the web) Could anyone post a line of code with an example? Thanks a lot -a- Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Tor...
2010 Jan 26
1
add points to 3D plot using p3d {onion}
...the onion package?? I want to plot points with different colors on the same 3D plot.? Perhaps I can do this without adding points but somehow directing the 'h' parameter to give different color to points based on a factor I assign to them? FYI, I can do this using using scatterplot3d() and points3d(), but these plots lack perspective and hence it is hard to sense depth without the use of color. Thanks, Brad
2008 Jul 24
1
Problem with scatterplot3d example
...rees) > s3d <- scatterplot3d(trees, type = "h", color = "blue", + angle = 55, scale.y = 0.7, pch = 16, main = "Adding elements") > my.lm <- lm(trees$Volume ~ trees$Girth + trees$Height) > s3d$plain3d(my.lm) Error: attempt to apply non-function > s3d$points3d(seq(10, 20, 2), seq(85, 60, -5), seq(60, 10, -10), + col = "red", type = "h", pch = 8) Any ideas on what I need to change in order to get the plane to plot? Tom -- View this message in context: http://www.nabble.com/Problem-with-scatterplot3d-example-tp18630468p18630468.ht...
2011 Dec 13
1
How to add points to two plots parallelly ?
...1<-scatterplot3d(mtcars[,3],mtcars[,4],mtcars[,5],main="common",pch=20) s3d2<-scatterplot3d(mtcars[,3],mtcars[,4],mtcars[,5],main="common",pch=20) s3d3<-scatterplot3d(mtcars[,3],mtcars[,4],mtcars[,5],main="common",pch=20) If I try to add points to s3d1, s3d1$points3d(mtcars[,3],mtcars[,4],mtcars[,5],col="red") The points go into s3d3 but not s3d1. What am I missing ? Additional notes : I am using "layout" function to include 3 plots in a page. Intention is to add data points to each of these plots. Basically I obtain data points while runn...