similar to: persp() problem

Displaying 20 results from an estimated 2000 matches similar to: "persp() problem"

2010 May 26
1
persp(); help with 'tck' option
Hi All, I'm using 'tck' option to *reduce* the length of tick marks but it is not working, can anyone please tell me where I'm going wrong... require(graphics) require(grDevices) x <- seq(-10, 10, length= 30) y <- x f <- function(x,y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r } z <- outer(x, y, f) z[is.na(z)] <- 1 # 'bg' works but 'tck' is not showing
2004 Aug 10
1
persp, array and colors
Dear R-users, I'd like to plot a three-dimensional surface and at the meantime I'm using an array. I would like to have the values of my first matrix in the heights of the plot and the colors of the single facet taking into account the second matrix. I hope that the next code will help all of you to understand better my issue, Thanks in advance, Giancarlo ############################ ##
2008 Jun 12
1
Problems with mars in R in the case of nonlinear functions
Hi, I'm trying to use mars function in R to interpolate nonlinear multivariate functions. However, it seems that mars gives me a fit which uses only very few basis function and it underfits very badly. For example, I have tried the following code to test mars: require("mda") f <- function(x,y) { x^2-y^2 }; #f <- function(x,y) { x+2*y }; # Grid x <-
2011 Mar 29
1
Dirichlet surface
Dear list members, I want to draw surfaces of Dirichlet distributions with different parameter settings. My code is the following: #<begin code> a1 <- a2 <- a3 <- 2 #a2 <- .5 #a3 <- .5 x1 <- x2 <- seq(0.01, .99, by=.01) f <- function(x1, x2){ term1 <- gamma(a1+a2+a3)/(gamma(a1)*gamma(a2)*gamma(a3)) term2 <- x1^(a1-1)*x2^(a2-1)*(1-x1-x2)^(a3-1)
2008 May 20
1
drawing lines in 3D (rotating them)
Hi the list, I write a short function to draw lines in 3D, showing then turning. At some point, I add "delais" to slow down the rotation. So two questions: 1) I try to find a library to draw animate lines in 3D but I did not find. That surprise me since it is very simple to do. Did I forget to look somewhere ? If it does not exists and I have to use my own function : 2) Is it
2009 Mar 14
4
persp plot + plotting grid lines
Dear all; Does anyone know how to add grid lines to a persp plot? I've tried using lines(trans3d..) but the lines of course are superimposed into the actual 3d surface and what I need is something like the plot shown in the following link: http://thermal.gg.utah.edu/tutorials/matlab/matlab_tutorial.html I'll appreciate any ideas Thanks PM
2003 Jul 12
2
help with bivariate density plot question
Dear R users: I have a dataset with two variables (>20000 observations, two samples from same subject) and I used "kernSur" from library(Genkern) to get a estimated bivariate density and corresponding plots as follows: new.data.normal<-data.normal[!is.na(data.normal[,2]),] x<-new.data.normal[,2] y<-new.data.normal[,3] op <- KernSur(x,y, xgridsize=50, ygridsize=50,
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
2005 Jun 24
9
R demos
Hi All, I am currently preparing some form of slideshow introducing R and its capabilities for some colleagues. The thing will be about 30 mins, and I'd like to have some "pretty pictures" and some "amazing facts" (I'm trying to sell, obviously :)). Can I ask if it's possible to easily retrieve a gross figure of the number of functions in R considering the
2009 Mar 29
2
number of ticks in a persp() plot
Hi, I am trying to specify four ticks (at 0,1,2,3 for the y axis) in a persp plot but the defaults overrule my specification and I obtain seven of them. Is it possible to gain full control over them in such a plot? Here is my code: matlines=matrix(c(1:7,3:9,3:9,2:8),nrow=7,ncol=4)
2006 Jun 10
1
Math symbols for labels in Perspective plots
Hi .. I would like to have math symbols in perspective plots i tried : persp(x,y,z,xlab=expression(phi)) but it plots it as phi. Thanks. Harsh __________________________________________________ [[alternative HTML version deleted]]
2005 Mar 16
1
Help in persp (VERY URGENT ASSISTANCE)
Dear All, I am very new to R projects.May be i am wrong in some steps.I have given the code which i tried for drawing 3d surface using persp.I need to label the axes with scales z <- array(topnew2$V2, dim=c(600,2)) x <- 10 * (1:nrow(z)) y <- (1:ncol(z)) persp(x, y, z, theta = 30, phi = 30, expand = 0.5, col = "lightblue", xlab ="fluidlevel", ylab
2000 Jun 26
1
persp greek label problem (PR#583)
Full_Name: Ramin Nakisa Version: 1.1.0 OS: i386 linux Submission from: (NULL) (192.127.94.7) Labels created with expression seem to disappear, e.g. the x axis label in x <- -6:16 contour(outer(x, x), method = "edge", vfont = c("sans serif", "plain"), xlab=expression(theta[0]), ylab=expression(theta[1])) and all three labels in x <- -6:16 persp(outer(x, x),
2005 Feb 01
0
persp plots axis tick-labels
Hi R-listers, I am having trouble with persp plotting and I hope some knowledgeable person can help me. I have searched the help files to no avail. I am sure there is a way of achieving this simple task. I thought in par maybe but that seems not to work for 3d plots. Maybe I have missed something. I read in ?persp that it expects increasing values for both my x and y axes, and a matrix
2002 Nov 04
0
persp(), x- and y-axis with character strings
Dear R list, I want to plot the yield curve in a 3D graph: the x-axis refers to time; the y-axis refers to the maturities and the z-axis are the yields. The following code works fine: persp(y, x, as.matrix(ypper), xlab="Last 50 periods", ylab="Maturities (months)",zlab="Yields", zlim=c(3,6),theta=130, phi=15, col="Seagreen", box=T,
2012 Jul 05
1
Adding Text to a persp plot using specific coordinates
Hi folks, I'm experiencing some hassle to add some text on a persp plot... Here is the code to generate the persp plot: x <- seq(-1.95, 1.95, length = 30) y <- seq(-1.95, 1.95, length = 30) z <- outer(x, y, function(a,b) a*b^2) persp(x, y, z,xlim=c(-2,2),ylim=c(-2,2),zlim=c(-8,8), phi=30, theta=-30,nticks=8,ticktype="detailed") I've tried the text() function :
2002 Mar 14
1
persp(): add second plane
Dear R-users, is it possible to add a second plane to the persp()-plot? I couldn't find any hint on that in the news archive... I'm using R.1.4.1 for Windows. Thanks in advance, Nina -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or
2002 Mar 14
1
persp(): add second plane
Dear R-users, is it possible to add a second plane to the persp()-plot? I couldn't find any hint on that in the news archive... I'm using R.1.4.1 for Windows. Thanks in advance, Nina -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or
2007 Feb 09
3
two perspective plots in in plot
Dear all, I would like to put two perspective plots into one plot. The help page for ?persp shows how one can add points and lines but not another perspective plot. data(volcano) z <- 2 * volcano # Exaggerate the relief x <- 10 * (1:nrow(z)) # 10 meter spacing (S to N) y <- 10 * (1:ncol(z)) # 10 meter spacing (E to W) ## Don't draw the grid lines : border = NA persp(x,
2012 Mar 07
1
plot intersecting planes
Hi all, I need to plot two intersecting planes in a graph. Using persp() function (see code below) I am not able to add a second plane with good results. I tried with par(new=TRUE) but the output was very poor. I have found some previous discussions about this point but (apparently) without a clear solution. Any advice would be appreciated. Simone Tenan ################## library(popbio)