Displaying 20 results from an estimated 1000 matches similar to: "Help regarding persp"
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
2005 Mar 10
1
R-help:loading data from text file and viewing it in persp
Hi All
i would like to get some help on how to use the persp() for 3d surface plotting with the data from txt file.
it has format like
x1 y1 z1
x2 y2 z2
x3 y3 z3
............
and so on...sometimes the txt file data may be very large also..
how could i load this txt file and view its 3d view.
thanks in advance
---------------------------------
[[alternative HTML version
2005 Mar 17
1
help for matrix formation.
Dear people,
I've been trying to find a way to do the following.
I have a data set in text file with 3 columns and 2400 rows. i tried to read the table as
fisrt<-("ex.txt",header=FALSE)
I would like to read the third column values (which has 2400 value) and split them into matrix of size (600,4):
as
first 600 column values in first column in matrix and next 600 next
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,
1999 Mar 30
0
Example(persp) fails in 0.63.4 and 0.64 (PR#152)
>From 0.63.4 or 0.64:
> example(persp)
persp> x <- seq(-10, 10, length = 50)
persp> y <- x
persp> f <- function(x, y) {
r <- sqrt(x^2 + y^2)
10 * sin(r)/r
}
persp> z <- outer(x, y, f)
persp> z[is.na(z)] <- 1
persp> par(bg = "white")
persp> persp(x, y, z, theta = 30, phi = 30, expand = 0.5,
col = "lightblue")
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
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
2003 Sep 17
0
Persp and color (again)
Hi guys,
After all the discussion yesterday about persp and color, I decided to
have a more closer look at demo(persp), and decided to write a function to
generate 'topo-like' colours to plot perspectives (Thanks a lot to Uwe
Ligges for his enlightning comments regarding the code in the demo).
Here it goes, I believe that this function will be pretty useful to a lot
of people:
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.
2004 Oct 26
1
persp(), scatterplot3d(), "..." argument
Hello list.
I very often need 3d scatterplots, and 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,
2004 Oct 26
1
persp(), scatterplot3d(), "..." argument
Hello list.
I very often need 3d scatterplots, and 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,
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
2001 Aug 07
1
multiple persp plots
Hello,
I would like to plot two superposed surfaces (original data, and smoothed
models). Basically, I would like to create a usual persp plot with box, and
then superpose a second surface (without box and axes) on the top plane of
the box defined by the first graph. I don't know if it is clear :-(
Is it possible to draw such a second surface in an existing persp plot in R?
Another (related)
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 :
2000 Mar 04
0
Re: persp() problem
At 22:31 03/03/00 +0100, Troels Ring wrote:
>Dear friends. A very humble admirer of the progress of R with a very
simple problem. I have the data shown below
>
>month day year dosis vanco
>12 31 1999 1 3.8
>1 3 2000 1 2.4
>1 7 2000 1 3.4
>1 12 2000 2 7.1
>1 14 2000 2 5.3
>1 17 2000 2 5.7
>1 19 2000 3 7.7
>1 21 2000 3 8.3
>1 24 2000 4 8.7
>1 26 2000 4
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,
2011 Mar 18
0
keep color range constant across three persp() graphs
Hi All.
I have created two, 3-D, color graphs using persp(). Z values range from 1
to 100 on the first plot, and 0.5 to 50 on the second plot.
I would like to keep the color range constant between the two graphs, rather
than each graph showing the full range of colors.
So the first graph should go from yellow to red and the second graph should
go from yellow to orange.
Below I present a
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
2010 Apr 20
1
3D surface plot with wireframe or persp?
Hello Dear,
I have a function, like z=f(x,y), and try a surface plot with this function.
But, on the reference of "wireframe" requires data option, so I generated x
and y, and computed z with them. But, still I have a problem to draw a
surface plot. The code and errors are
##################################################
mle_beta0=64.43707;
mle_beta1=-24365.16;
# generating for
2003 Sep 08
2
Persp Plot
I am trying to graph two planes on the same graph using persp(). I can only
get one plane to plot at a time. Can someone explain how I can graph two
planes on the same graph using persp? I've looked throught the
documentation, but cannot find any references to appending a persp plot.
Thanks.
Sincerely yours,
Mark J. Lamias
Statistical Consultant