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 find

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 = "latitude",

[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

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 wrote: > Dear R People: > > I am using Response Surface Models and and also using the "persp" fun

[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 <- coded.

Re: [R] persp() problem

2011-11-19 Thread William Dunlap
potfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of John Benning > Sent: Saturday, November 19, 2011 12:20 PM > To: r-help@r-project.org > Subject: [R] persp() problem > >

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 <- 5*(0:

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, 10

[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 "*inv

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 readi

Re: [R] persp()

2011-08-04 Thread Jean V Adams
.,, ><(((º> `·.,, ><(((º> Jean V. Adams Statistician U.S. Geological Survey Great Lakes Science Center 223 East Steinfest Road Antigo, WI 54409 USA From: Rosario Garcia Gil To: "r-help@r-project.org" Date: 08/04/2011 01:05 AM Subject: [R] persp() Sent by: r-he

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 countri

[R] persp()

2011-08-03 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 files

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 <- t

[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 ha

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

[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) z[is

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
xt, but didn't try 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-pr

Re: [R] 'persp' query

2009-10-06 Thread David Winsemius
Wednesday, 7 October 2009 1:43 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 '

Re: [R] 'persp' query

2009-10-06 Thread Geoffrey William Heard
id 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 'pers

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 s

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 lab

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

[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 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)

Re: [R] persp plot + plotting grid lines

2009-03-15 Thread Kingsford Jones
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 <- outer(x,y, peaks) z2 <- 10 * round(c(z) + ab

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-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: http://ther

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: htt

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,

[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: http://thermal.gg.utah.edu/tutorials/matlab/matlab_tutorial

Re: [R] persp plot

2008-06-25 Thread Ben Bolker
Chad Junkermeier 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 dat

Re: [R] persp plot

2008-06-24 Thread Chad Junkermeier
IL PROTECTED] ] 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 be

[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 break

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 un

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 do

[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

[R] persp(): how to control the distance between the axis and the axis labels

2007-12-26 Thread Artur Matos
Hi, I have been using persp() to draw 3D surface plots of my data, but I always run into a small problem: If use the standard settings, the axis labels always end up too close and overlapping the the axis numbers. Is there any setting for controlling the distance between the axis labels and th

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'

[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'. __ R-help@r-proj

Re: [R] persp() problem

2007-09-11 Thread Petr PIKAL
Hi He is actually plotting DM matrix against default values [0,1]. So what he needs to do is to change y to c(1,10) and x to seq(1,20,2) to enable his code work. And even in that case there is not possible AFAIK to control exact labeling of axes as they are internaly recalculated to [0,1] value

Re: [R] persp() problem

2007-09-11 Thread Xavier Abulker
There is an error in your code: in persp(x , y , z) the length of x is the number of rows of z, the length of y is the number of columns of z, You should also name the rows and columns in z with x and y Economics Guy wrote: > > I am having some trouble getting the persp() package to change th