Displaying 20 results from an estimated 20000 matches similar to: "contour and persp help please"
1998 Dec 04
1
contour labelling [was "Re: image ()"]
> From: Bill Simpson <wsimpson at uwinnipeg.ca>
> Subject: Re: contour labelling [was "Re: [R] image ()"]
> MIME-Version: 1.0
>
> > We may be missing the crux here: was it to have a means of
> > displaying such surfaces?
>
> Yes, bang on. I knew of the
> existence of the Delaunay code in the R libraries. Yes I want
> to make a picture that
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.
2006 Nov 07
1
plot questions?-errors in persp(x1, x2, y) and contour(x1, x2, y)
Dear Uwe Ligges ,
I still can't finish it.
*> aa* #my data
x1 x2 y
5 0.05 6 4.4180
1 0.50 3 2.6979
4 0.50 9 2.9000
7 0.95 6 2.6230
8 0.95 6 2.9078
9 0.95 6 2.6727
3 1.40 3 2.4203
2 1.40 9 2.5329
6 1.85 6 2.4867
*> attach(aa)*
*> persp(x1,x2,y*
error in persp.default(x1, x2, y) : increasing 'x' and 'y' values expected
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
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
2006 May 09
2
RFC: log='z' for image, contour, persp?
I've been thinking of adding the possibility of including "z" among the
axes to be logged in image, contour, and persp. In the first two, it
would only affect where the breaks were set if they are calculated
automatically; it would have a bigger effect in persp.
For example,
image(x, y, z, log="z")
would set 12 colours evenly spaced on a log scale of the z values.
1999 Nov 16
1
spikes in contour and persp (PR#327)
The following matrix of normed likelihoods should give a smooth
surface but instead gives a series of spikes in both persp and contour
(the dim labels are the axes values). I know an algorithm cannot be
infallible but it would be nice to have some parameters to control the
smoothing. (It takes close to an hour to produce this matrix on a
Pentium II 300mh. It was after that that it crashed with the
2000 Oct 26
2
persp plot question..
Dear All,
I have been trying to to do this for a few days now. I can generate
persp plot OK and can generate it in colour using the command
persp(x,y,z,col=terrain.colors(20))
However, I was wondering if it is possible to shade the 3d surface like a
contour plot. i.e. black for large z, white for small z, say
Thanks in advance
Colin
2001 Nov 08
0
-Altering labels and tickmarks on persp() plots
All,
This was posted earlier but may have got lost in another thread.
Can someone tell me how to independently alter the fontsize and position of
labels on a persp plot??
I've tried using titles() and axes() but they seem to only apply to the
standard plot() and contour plots (contour() and filled.contour(). Commands
like text() seem only to add to the margin of the plot rather than
1998 Dec 03
2
contour labelling [was "Re: image ()"]
> From: Martin Maechler <maechler at stat.math.ethz.ch>
> To: royle at bearmtn-e0.cgd.ucar.edu
> CC: lgygax at access.unizh.ch, r-help at stat.math.ethz.ch
> Subject: contour labelling [was "Re: [R] image ()"]
> Mime-Version: 1.0 (generated by tm-edit 7.106)
>
> >>>>> "Jeffrey" == Jeffrey A Royle <royle at bearmtn-e0.cgd.ucar.edu>
2004 Feb 18
3
persp and lines()
R-sters:
I'm interested in keeping data plotted in persp to preserve the wireframe
look, I'd just like to change one of the lines drawn (in either the x or y
direction) into a different color so that it stands out.
Or is there some way to add a line (say, via lines(), or abline()) to a
persp() plot at the designated x or y that would follow the z surface
contour? I could add a line
2007 Jan 01
4
Help with filled.contour()
The following plot is a first approximation to what I need:
***********************************
mu1 <- 0
mu2 <- 5
s <- 1
x <- seq(-2.5, 7.5, length = 41)
y <- seq(-2.5, 2.5, length = 41)
f <- function(x,y){
term1 <- 1/(2*pi*sqrt(s*s))
term2 <- -1/2
term3 <- (x - mu1)^2/s
term4 <- (y - mu1)^2/s
term5 <- (x - mu2)^2/s
term1*(.5 * exp(term2*(term3 + term4)) + .5 *
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),
2003 Dec 30
1
Mistake with contour...
I'm reading Ripley-Venables "Modern Applied Statistics with S - Fourth edition" , at the same time trying the examples proposed in the book using R 1.8.1 under linux.
Now I'm trying the following code from the book (example code of spatial statistics at page 76) with R :
| data(topo) library("spatial") topo.loess<-loess(z ~ x * y, topo,
| degree= 2,span=0.25)
|
2001 Nov 21
2
contour as a generic function?
After "image" and "persp" would it be interesting to als have contour as a
generic function?
Cheers
Paulo Justiniano Ribeiro Jr
Dept Maths & Stats - Fylde College
Lancaster University
Lancaster LA1 4YF - U.K.
e-mail: Paulo.Ribeiro@est.ufpr.br
http://www.maths.lancs.ac.uk/~ribeiro
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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,
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
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:
1999 Jun 10
2
limit digits in text()?
I am labelling the axes of a persp() plot manually using text(). For
one spot in the plot I use:
text(-.62,.37,max(dprime))
The problem is that the label is printed as 1.6456330961.
I would like 1.6.
I tried options(digits=2) and str(digits.d=2)--no effect. (I don't like
these methods anyway since I just want to modify how the label in the plot
is printed; I want to print all the digits
1999 May 10
1
dotted contour line for negative values?
I have a contour plot where the surface can take on positive and negative
values. I would like to use solid contour lines for positive values and
dotted contour lines for negative values. I saw a plot like this produced
by S-Plus before. Is there a way to do this with R? If not, can anyone
suggest a way to make interpretation of the contour plot easier? (Right
now, it is not clear if a set of