Re: [R] persp fail with non-equidistant dates

2016-08-22 Thread Duncan Murdoch
Please keep discussion on the mailing list. On 22/08/2016 12:08 PM, Tomas Bayer wrote: Hello, we have tried the pre-processing till now but also with this error message: akima.li <- interp(x, y, F, xo=seq(min(x), max(x), length = 100), yo=seq(min(y), max(y), length = 100)) Error: could not

Re: [R] persp fail with non-equidistant dates

2016-08-22 Thread Duncan Murdoch
On 22/08/2016 11:17 AM, Tomas Bayer wrote: Hello, when I plotted non-equidistant data in 3D (using persp and contour), it was ended with the same error message: persp(y, x, z, xlab="latitude", ylab="longitude", zlab="altiude", main="Altitude") Error in persp.default(y, x, z, xlab =

[R] persp fail with non-equidistant dates

2016-08-22 Thread Tomas Bayer
Hello, when I plotted non-equidistant data in 3D (using persp and contour), it was ended with the same error message: > persp(y, x, z, xlab="latitude", ylab="longitude", zlab="altiude", main="Altitude") Error in persp.default(y, x, z, xlab = "latitude", ylab = "longitude", : increasing 'x' and

[R] persp and Response surface models

2013-12-03 Thread Erin Hodgess
Dear R People: I am using Response Surface Models and and also using the persp function to plot them. Today my particular model is y~ x1 + x2 + x3 I can fit my RSM easily. My question is: how do I use the persp such that I can fix the x3 at a particular value, please? smell.code -

Re: [R] persp and Response surface models

2013-12-03 Thread Erin Hodgess
SOLVED: xs - canonical(smell.rsm)$xs xs x1x2x3 0.1219125 0.1995746 1.7705249 persp(smell.rsm,~x1+x2,at=xs,contour=TRUE) On Tue, Dec 3, 2013 at 9:33 PM, Erin Hodgess erinm.hodg...@gmail.comwrote: Dear R People: I am using Response Surface Models and and also

[R] persp() problem

2011-11-19 Thread John Benning
Hi, and thanks in advance for any assistance, I'm new to R and to this mailing list, and am having trouble with the * persp()* function. I've got a matrix (z) of values for various combinations of x and y, each of which is a set of (0, 5, 10, 15, 20). But when I try * persp(x,y,z)*, I get an

Re: [R] persp() problem

2011-11-19 Thread David Winsemius
On Nov 19, 2011, at 3:19 PM, John Benning wrote: Hi, and thanks in advance for any assistance, I'm new to R and to this mailing list, and am having trouble with the * persp()* function. I've got a matrix (z) of values for various combinations of x and y, each of which is a set of (0, 5,

Re: [R] persp() problem

2011-11-19 Thread Rolf Turner
Your call to persp() is fine, and works just fine for me. Obviously there is something funny about your data (x, y, and z). They must not be numeric (despite appearances). There is something you haven't told us here; how did you obtain/construct x, y, and z? Try the following: x - y -

Re: [R] persp() problem

2011-11-19 Thread William Dunlap
-help@r-project.org Subject: [R] persp() problem Hi, and thanks in advance for any assistance, I'm new to R and to this mailing list, and am having trouble with the * persp()* function. I've got a matrix (z) of values for various combinations of x and y, each of which is a set of (0, 5, 10, 15

Re: [R] persp()

2011-08-05 Thread Johannes Hüsing
Am Donnerstag, den 04.08.2011, 02:58 +0200 schrieb Rosario Garcia Gil: I am trying to draw a basic black and white map of two European countries. Are you planning just to draw the boundaries? Or what do you mean by basic black and white. After searching some key words in google and reading

[R] persp()

2011-08-04 Thread Rosario Garcia Gil
Hello I am trying to draw a basic black and white map of two European countries. After searching some key words in google and reading many pages I arrived to the conclusion that persp() could be used to draw that map. I have prepared three small example files, which are supposed to be the

Re: [R] persp()

2011-08-04 Thread Eik Vettorazzi
Hi Rosario, you might have a look at the maps and maptools (for reading shape-files) packages. #e.g. library(maps) map(world,c(sweden,germany)) Cheers Am 04.08.2011 02:58, schrieb Rosario Garcia Gil: Hello I am trying to draw a basic black and white map of two European countries. After

Re: [R] persp()

2011-08-04 Thread Jean V Adams
Center 223 East Steinfest Road Antigo, WI 54409 USA From: Rosario Garcia Gil m.rosario.gar...@slu.se To: r-help@r-project.org r-help@r-project.org Date: 08/04/2011 01:05 AM Subject: [R] persp() Sent by: r-help-boun...@r-project.org Hello I am trying to draw a basic black and white map of two

Re: [R] persp and trans3d for type=h points

2011-06-14 Thread Uwe Ligges
You are drawing the line to the center of the plot (which is 0 be design). What you actually want is to plot segments to the min(z) value. Example: Z - matrix(1:9, 3) surf - persp(1:3, 1:3, Z) points(trans3d(x=2, y=2, z=5, surf), col=red, pch=19) from - trans3d(x=2, y=2, z=5, surf) to -

[R] persp and trans3d for type=h points

2011-06-13 Thread Tarmo Remmel
Hello, I have a matrix [9,11] called tempmed from which I produce a perspective plot. I then indicate a point on the surface to which I want to drop a point using points() and trans3d(). The code is below. However, the dropped line does not draw properly on the plot, it only comes down about

[R] persp(); help with 'tck' option

2010-05-26 Thread Kim Jung Hwa
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)

Re: [R] persp(); help with 'tck' option

2010-05-26 Thread Sean Anderson
On Wed, May 26, 2010 at 8:53 PM, Kim Jung Hwa wrote: 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 -

Re: [R] persp function question

2009-11-09 Thread Duncan Murdoch
On 11/9/2009 1:00 PM, STEFFEN Julie wrote: Hello, I have a question about persp function: I made my classical matrix with x, y and z variables and I dont know why I obtain a 3D image with overestimate heights. How can you tell it overestimates heights? There's no scale given. Duncan Murdoch

Re: [R] 'persp' query

2009-10-07 Thread Peter Ehlers
it, as was unsure what the appropriate 'side' value would be. Any thoughts? Cheers Geoff -Original Message- From: Peter Ehlers [mailto:ehl...@ucalgary.ca] Sent: Wednesday, 7 October 2009 1:43 AM To: David Winsemius Cc: Geoffrey William Heard; r-help@r-project.org Subject: Re: [R] 'persp' query

[R] 'persp' query

2009-10-06 Thread Geoffrey William Heard
Hi All I'm creating some 3-D plots using the function 'persp', and have a query regarding the ability to make changes to the label of the z-axis. There are two things I would like to do. First, the default setting places the label a little close to the axis for my liking. Is there any way of

Re: [R] 'persp' query

2009-10-06 Thread Peter Ehlers
Geoff, One way (the only way without modifying source code?) to satisfy your first wish is to insert a newline before your label as in zlab = \nMy z-text. I don't know of an answer for your second wish other than using the single letter Z as your label :) -Peter Ehlers Geoffrey William

Re: [R] 'persp' query

2009-10-06 Thread David Winsemius
On Oct 6, 2009, at 4:46 AM, Geoffrey William Heard wrote: Hi All I'm creating some 3-D plots using the function 'persp', and have a query regarding the ability to make changes to the label of the z- axis. There are two things I would like to do. First, the default setting places the

Re: [R] 'persp' query

2009-10-06 Thread Peter Ehlers
David Winsemius wrote: On Oct 6, 2009, at 4:46 AM, Geoffrey William Heard wrote: Hi All I'm creating some 3-D plots using the function 'persp', and have a query regarding the ability to make changes to the label of the z-axis. There are two things I would like to do. First, the default

Re: [R] 'persp' query

2009-10-06 Thread Geoffrey William Heard
: Geoffrey William Heard; r-help@r-project.org Subject: Re: [R] 'persp' query David Winsemius wrote: On Oct 6, 2009, at 4:46 AM, Geoffrey William Heard wrote: Hi All I'm creating some 3-D plots using the function 'persp', and have a query regarding the ability to make changes to the label

Re: [R] 'persp' query

2009-10-06 Thread David Winsemius
AM To: David Winsemius Cc: Geoffrey William Heard; r-help@r-project.org Subject: Re: [R] 'persp' query David Winsemius wrote: On Oct 6, 2009, at 4:46 AM, Geoffrey William Heard wrote: Hi All I'm creating some 3-D plots using the function 'persp', and have a query regarding the ability

Re: [R] persp plot + plotting grid lines

2009-03-15 Thread David Winsemius
This wiki page has the answer. Draw the plot first to establish the coordinate system and create the viewing transformation matrix. Draw the grid lines with lines(trans3d()), and then put a: par(new=T) ... and then redraw the plot over the gridlines.

Re: [R] persp plot + plotting grid lines

2009-03-15 Thread Duncan Murdoch
On 15/03/2009 10:07 AM, Kingsford Jones wrote: Building on Duncan's code, here's an approximation to the Matlab 'peaks' plot referred to by Pedro: peaks - function(x, y) { 3 * (1-x)^2 * exp(-(x^2)-(y+1)^2) - 10 * (x/5-x^3-y^5) * exp(-x^2-y^2) - 1/3*exp(-(x+1)^2-y^2)} x - y - seq(-3,3,.1) z

[R] persp plot + plotting grid lines

2009-03-14 Thread Pedro Mardones
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:

Re: [R] persp plot + plotting grid lines

2009-03-14 Thread David Winsemius
Ideas... not a solution. Plot the grid within your ranges using something along the lines, literally and figuratively, based on the second example of persp's help pages. For the z=8 grid lines on that example you could use: for (ix in seq(-10,10, by=5)) lines (trans3d(x=ix, y=seq(-10,10,

Re: [R] persp plot + plotting grid lines

2009-03-14 Thread David Winsemius
On Mar 14, 2009, at 12:02 PM, Pedro Mardones wrote: 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:

Re: [R] persp plot + plotting grid lines

2009-03-14 Thread Duncan Murdoch
On 14/03/2009 12:02 PM, Pedro Mardones wrote: 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:

Re: [R] persp plot

2008-06-25 Thread Ben Bolker
Chad Junkermeier junkermeier at byu.edu writes: I have a set of data in the form x1, y1, z1 x1, y2, z2 ... x1, yN, zN x2, y1, z(N+1) x2, y2, z(N+2) ... x2, yN, z(2N) ...and so on... xM, yN, val(M*N) Do you have any suggestions? Not at all carefully tested, but: ## make up

[R] persp plot

2008-06-24 Thread Chad Junkermeier
I have a set of data in the form x1, y1, z1 x1, y2, z2 ... x1, yN, zN x2, y1, z(N+1) x2, y2, z(N+2) ... x2, yN, z(2N) ...and so on... xM, yN, val(M*N) I have been trying to figure out how to get R to use this data in a persp plot. So far the only thing that I can figure out to do is to

Re: [R] persp plot

2008-06-24 Thread Chad Junkermeier
] ] On Behalf Of Chad Junkermeier Sent: Tuesday, June 24, 2008 7:39 AM To: r-help@r-project.org Subject: [R] persp plot I have a set of data in the form x1, y1, z1 x1, y2, z2 ... x1, yN, zN x2, y1, z(N+1) x2, y2, z(N+2) ... x2, yN, z(2N) ...and so on... xM, yN, val(M*N) I have been trying to figure out

Re: [R] persp question

2008-03-12 Thread Duncan Murdoch
On 11/03/2008 2:40 PM, [EMAIL PROTECTED] wrote: 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

[R] persp question

2008-03-11 Thread markleeds
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

Re: [R] persp question

2008-03-11 Thread David Winsemius
[EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: 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

[R] persp() misfeature

2007-12-02 Thread Allen McIntosh
Version: Observed in 2.5.1 x - 1:10 y - 1 z - array(1:10,dim=c(10,1)) persp(x,y,z) Error in persp(x, y, z, xlim, ylim, zlim, theta, phi, r, d, scale, expand, : invalid 'x' argument The problem isn't 'x'. It's 'y'. __

Re: [R] persp() misfeature

2007-12-02 Thread Duncan Murdoch
On 02/12/2007 2:16 PM, Allen McIntosh wrote: Version: Observed in 2.5.1 x - 1:10 y - 1 z - array(1:10,dim=c(10,1)) persp(x,y,z) Error in persp(x, y, z, xlim, ylim, zlim, theta, phi, r, d, scale, expand, : invalid 'x' argument The problem isn't 'x'. It's 'y'. Right, also