similar to: invert axis persp plot

Displaying 20 results from an estimated 10000 matches similar to: "invert axis persp plot"

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 :
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)
2012 Apr 20
1
lines on persp plot - proper depth ordering
Hello R-help! I am trying to draw series of lines in 3d, and I am not sure how to get the depth set up properly - lines that are in front of other lines appear to be behind and vice versa. I've been doing this by first generating an empty persp plot, then adding lines via the data into trans3d followed by lines (this is probably a bad approach, but it was the first one I could get working).
2010 Feb 07
1
contour & persp
I have this data set that both x & y are ordered vectors of length 600 & 700 respectively; z is a 600 by 700 matrix whose entry z[i,j] is either a missing value (indicated by 'NaN') or a real number between 0 and 1. The contour function contour(x,y,z) gives me a blank picture. I guess the reason is that most of z-entries are missing, only less than 1% are non missing.
2007 Sep 10
1
persp() problem
I am having some trouble getting the persp() package to change the x and y axis on a 3d plot. It defaults to the [0,1] interval and when I try to change it I get errors. Example: This works: ------------ D <- c(1,2,3,4,5,6,7,8,9,10) M <- c(11,12,13,14,15,16,17,18,19,20) DM <- cbind(D,M) persp(DM, theta = 40, phi = 30, expand = 0.5, col = "lightblue", ltheta = 120,
2008 Mar 11
2
persp question
someone sent in a question earlier about doing something in 3D so i took a stab at it purely for educational purposes ( i'm not even sure that I understood the question actually ). Unfortunately, persp gives me an error that I don't understand because it says "object y not found". I'm sending y in as a parameter to persp similar to what ?persp shows in one of oits examples
1999 Feb 01
0
persp on x,y,z
I have 3 vectors x,y,z: x<-c(-2.88,-1.92,-.96,0,.96,1.92,2.88,3.84, -1.92,-.96,0,.96,1.92,2.88,3.84, -.96,0,.96,1.92,2.88,3.84, 0,.96,1.92,2.88,3.84, .96,1.92,2.88,3.84, 1.92,2.88,3.84, 2.88,3.84, 3.84) y<-c(rep(-3.84,8), rep(-2.88,7), rep(-1.92,6), rep(-.96,5), rep(0,4), rep(.96,3), rep(1.92,2), 2.88) z<-c(.65,1.78,2.4,2.54,3.04,2.22,2.97,3.56, .745,1.287,1.98,1.91,2.02,2.24,2.95,
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
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
2009 May 27
1
contour lines on persp plot
Hello folks, I am a beginner R user. I have been able to make a 3D surface plot using 'persp'. The surface is made by a grid of lines emanating perpendicularly from each of the x and y axes at regular intervals. I can get rid of that grid by setting 'border=NA'. Can anyone suggest some ways to replace the grid with contour lines, to create a 3-dimensional contour map? Thanks
2003 Jun 05
1
persp(), par() and axis()
Dear R experts, On explanation of persp() parameters the last item is: ...: additional graphical parameters (see `par'). However, setting the `tcl' parameter has no any effect. I guess that axes are added to persp() in somewhat freakish way, and have nothing in common with axis() function. I found the very useful trans3d() function in persp() help page, and I'd like to use it
1999 Jan 19
1
axis labels and ticks in persp
1. This doesn't work persp(x,y,z,col="grey",xlab="x",ylab="y",zlab="z") but I can get axis lables on x and y by persp(x,y,z,col="grey") title(xlab="x", ylab="y") BUT I can't figure out how to get a label for z. How to do it? 2. To be be consistent with image(), I think persp should make z the axis it now calls y (and
2001 Oct 24
1
How change the size of persp() axis labels?
Hi, I have been using the persp() function to plot species response surfaces based on GAMs (using package mgcv). Everything works fine, except that I have a slight problem when it comes to producing a figure with multiple (4 - 6) persp() plots on it. The axis labels remain the same size, no matter how large or small the plot is, causing some overlap when the multiplot figure is produced. Is
2011 Sep 07
4
sample within groups-slight problem
I want to sample within groups, and when a group has only one associated number to just return that number. If I use this code: groups <- c(1, 2, 2, 2, 3) numbers <- 1:5 tapply(numbers, groups, FUN = sample) I get the following output: > groups <- c(1, 2, 2, 2, 3) > numbers <- 1:5 > tapply(numbers, groups, FUN = sample) $`1` [1] 1 $`2` [1] 3 2 4 $`3` [1] 2 3 5 1 4
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
2005 May 30
1
persp, add lines/highlights
Hello R-sters, I'm trying to add several lines to a response surface that I've plotted using persp(). I've tried lines() using the "trans3d" function but I've been unsuccessful in getting it to work (R v2.0.1). Essentially, I'm trying to highlight one or more of the surface wireframe lines in a bolder (or different) color. Any tips from those of you who have some
2010 Jul 30
2
Layering multiple persp plots
Hi all, I've got two persp plots with Identical X and Y's, and I'd like to plot them on the same graph, so that it is obvious where one plot is above the other. I can't find any mention of this anywhere. Do I need to use wireframe? Any help is appreciated. Thanks, -- Ian Bentley M.Sc. Candidate Queen's University Kingston, Ontario [[alternative HTML version deleted]]
2010 Mar 10
0
Color facets by z-level (solved by creating example)
I am having trouble getting my facets colored with "concentric" colors by z level. This code give a fair representation of my problems dealing a real dataset cmtx <- matrix(, nrow=10, ncol=10) cc <- (row(cmtx)-5)^2 + (col(cmtx)-5)^2 cc #---------- [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 32 25 20 17 16 17 20 25 32 41 [2,]
2008 Aug 30
1
help with "persp" function
Dear List, I am trying to draw a rectangular plane using the persp function, however I can't seem to get it to work. I want the length along x1 axis to be between 1 and 3 and the length along the x2 axis to be between 1 and 4. All z values for x1 should be equal (say, z=1) because this is a plane, not a cube. Below is my current code. Any help is appreciated Thanks in advance dxc13 x