Displaying 20 results from an estimated 20000 matches similar to: "R-beta: Contour package"
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
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>
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
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
1998 Dec 04
1
contour labelling [was "Re: image ()"]
Brian D Ripley writes:
Interactive rotation of perspective plots would be a great
boon, as would shading options for perspective plots, including
contouring on such plots.
I am envisioning a division into static and dynamic plots. The static
version will concentrate on rendering as nice a picture as possible -
anti-aliasing (if supported) arbitrary text rotation etc, whereas the
dynamic
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
1999 May 04
0
contour and persp help please
I have data saved in files on disk in following format
x y z
------------------
1 1 1
1 2 2
2 1 3
2 2 4
Normally I read the file into a data frame, but suppose I do it this way:
x<-seq(1,2)
y<-seq(1,2)
z<-seq(1,4)
data<-data.frame(x,y,z)
image(unique(data$x),unique(data$y),data$z, col=gray(0:19/19),
xlab="x", ylab="y")
I was helped at some point in the past on
2010 Feb 20
1
Add lines (contours) to lattice wireframe plot
Hi,
I draw a surface corresponding to bivariate density of independent
variables (rho=0) using persp(). Then I add a contour line (i.e.,
circle in my case) at a particular density. Below is a minimal example
of what I have so far.
# Bivariate density
dnorm2d <- function(x, y, rho = 0) {
xoy = (x^2 - 2 * rho * x * y + y^2)/(2 * (1 - rho^2))
density = exp(-xoy)/(2 * pi * sqrt(1 - rho^2))
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
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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.
1998 Jan 12
0
R-beta: contour labels
I naively thought I could add x and y axis labels onto a contour plot (as
in image). I can't. I realize I can use the workaround Ross posted in
answer to my previous post about image(). I just thought I would mention
it here in case contour was "supposed" to be able to work as image does
with axis labels.
Bill Simpson
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
2007 Feb 09
3
two perspective plots in in plot
Dear all,
I would like to put two perspective plots into one plot. The help page
for ?persp shows how one can add points and lines but not another
perspective plot.
data(volcano)
z <- 2 * volcano # Exaggerate the relief
x <- 10 * (1:nrow(z)) # 10 meter spacing (S to N)
y <- 10 * (1:ncol(z)) # 10 meter spacing (E to W)
## Don't draw the grid lines : border = NA
persp(x,
2009 Nov 23
0
R-help Digest, Vol 81, Issue 23
Hi,
keine ahnung. Das liegt jetzt bei Hr. Feld. Frag mal bei ihm nach.
Gr??e
Thushyanthan
r-help-request at r-project.org wrote:
> Send R-help mailing list submissions to
> r-help at r-project.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://stat.ethz.ch/mailman/listinfo/r-help
> or, via email, send a message with subject or body 'help'
2003 Sep 01
0
Re: Plotting bivariate normal distributions.
You'll find that it is a lot easier to do it in R:
# lets first simulate a bivariate normal sample
library(MASS)
bivn <- mvrnorm(1000, mu = c(0, 0), Sigma = matrix(c(1, .5, .5, 1), 2))
# now we do a kernel density estimate
bivn.kde <- kde2d(bivn[,1], bivn[,2], n = 50)
# now plot your results
contour(bivn.kde)
image(bivn.kde)
persp(bivn.kde, phi = 45, theta = 30)
# fancy contour with
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
2006 Jul 01
0
SUMMARY: making contour plots using (x,y,z) data
Folks,
A few days ago, I had asked a question on this mailing list about
making a contour plot where a function z(x,y) is evaluated on a grid
of (x,y) points, and the data structure at hand is a simple table of
(x,y,z) points. As usual, R has wonderful resources (and subtle
complexity) in doing this, and the gurus of the list showed me the
way. Here's a complete working example. One might
2003 Aug 06
1
contour lines intersect
Hi,
Sorry if this is already known...
contour() sometimes draws contour lines that intersect.
Is there a temporary fix?
A dataset which causes problems is at
http://www.maths.uwa.edu.au/~adrian/dumpdata.R
If you try just
source("dumpdata.R")
image(huh)
contour(huh)
the 100 x 100 matrix 'huh' contains an hourglass-shaped region
of values around 0.8. The contour plot
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 *