Displaying 20 results from an estimated 5000 matches similar to: "Plot of set"
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.
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 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
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
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.
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
2003 Aug 30
1
3D plot of a bivariate normal distribution
Hi,
I've used the Mathematica to produce 3D graphics, contour plots of a
bivariate normal distribution
Now I want make these graphics in R, but i do not know how.
I would like to:
- Plot a 3D graph for some different variance matrix
- Plot the contour plots
- Find and try to plot (in the 3d graph ou contour plot) the (1-a)%
confidence region based in a chi-square(a) with the degrees of
2003 Dec 25
6
Plot a sphere
Hi,
I'm new to R (and math ;) Would somebody please be so kind as to direct me
in plotting a 3D sphere?
I tried something in the lines of:
####
y <- x <- seq(-pi, pi, length=pi*10)
f <- function(x,y)
{
z <- sqrt(pi - x^2 - y^2)
#z[is.na(z)] <- 0
z
}
z <- outer(x, y, f)
persp(x, y, z, theta = 120, phi = 30)
####
I've also tried: .... make.surface.grid(...) ..
2003 Jul 13
2
Coloured 3d surface
Hello,
I created a 3d surface (persp) with some points overlaid on it, which is
fine. Now I have a second set of z-values(x,y-values same as the first
surface), which I would like to make visible on the same graph, however,
not as a surface, but rather as coloured contour on the first surface,
so that the resulting graph will consist of the original surface having
the colour of the second
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 Oct 12
2
adding text to persp
Any ideas on adding text to persp plots? The perspp function from S-plus
is not implemented. I'm using R1.3.0 on Win2000.
Thanks,
Sundar
--
Sundar Dorai-Raj, Ph.D.
Assistant Professor
Discrete & Statistical Sciences Office: (334) 844-3647
231 Allison Lab Fax: (334) 844-3611
Auburn University Email: dorairaj at dms.auburn.edu
Auburn AL 36849-5307
2006 Jan 07
2
Question about graphics in R
Considering the R function/plot shown below, I wonder whether
it is possible to do the following changes:
(1) Change the color of each point to be picked from
list of colors according to its z-value. (The range
should be from blue (z=0) to red (z=1).) The grid
should then be omitted. [I have seen "terrain.colors", but
don't know how to use it for this purpose.]
(2) Add two lines to
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
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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>
2006 Jun 28
1
persp/ scatterplot3d
Dear WizaRds,
I would like to create a 3d-plot with persp(). I sampled 17 points
with xyz-coordinates (real-life example!), representing the peaks of the
whole plane with "zero coordinates" x=3,y=3,z=3. My intention is to show
which entries are above or below the "zero" level with persp() on a
nicely created grid. I also tried scatterplot3d(), but, alas, I am
unable
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 Feb 12
1
3d plots?
Hi all
I'm trying to create a three-dimensional wireframe-type plot,
much like the screenshot shown at
http://www.r-project.org/screenshots/volcano-persp.jpg
In my case, I'm trying to show a density estimate of
two-variable system, using the GenKern package. I've
used the image() and contour() to create a nice shaded plot,
but I've found a 3d plot is often easier for the
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,
2005 Feb 05
1
plot smooth density estimates for bivariate data
Hi, there.
Suppose I have a bivarariate data matrix y1 and y2. I want to plot a 3-D
picture of the estimated density f(y1, y2) against y1 and y2? How can I do
that? Do I use persp() or density()?
Thanks for your help.
Yulei
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Yulei He
1586 Murfin Ave. Apt 37
Ann Arbor, MI 48105-3135
yuleih at umich.edu
734-647-0305(H)
734-763-0421(O)
734-763-0427(O)
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