[R] Creating 3D Gaussian Plot
Bill.Venables at csiro.au
Sat Jan 28 23:48:02 CET 2006
Getting a picture like this is pretty easy. e.g.
x <- y <- seq(-5, 5, len = 200)
X <- expand.grid(x = x, y = y)
X <- transform(X, z = dnorm(x, -2.5)*dnorm(y) - dnorm(x, 2.5)*dnorm(y))
z <- matrix(X$z, nrow = 200)
persp(x, y, z, col = "lightgoldenrod", border = NA,
theta = 30, phi = 15, ticktype = "detailed",
ltheta = -120, shade = 0.25)
You can vary things as you wish.
I don't follow the remark about picking grid points at random for
analysis, though. On simple, entirely deterministic things like this
wouldn't you just be analysing the randomness that you inject into it by
the choice process, effectively?
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Laura Quinn
Sent: Sunday, 29 January 2006 12:28 AM
To: Duncan Murdoch
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] Creating 3D Gaussian Plot
With further apologies for the poor graphics, this link demonstrates the
sort of 3d mesh which I am hoping to replicate - I would like to be able
to replicate a number of these of varying intensity. Demonstrating
different levels of potential via the "steepness" of the slopes.
I then wish to pick a number of grid points at random from the output to
perform a further analysis upon.
I hope this makes things a little clearer!
Again, any help gratefully received, thank you.
Institute of Atmospheric Science
School of Earth and Environment
University of Leeds
tel: +44 113 343 1596
fax: +44 113 343 6716
mail: laura at env.leeds.ac.uk
On Sat, 28 Jan 2006, Duncan Murdoch wrote:
> On 1/28/2006 8:55 AM, Laura Quinn wrote:
> > Hello,
> > I requested help a couple of weeks ago creating a dipole field in R
> > receieved no responses. Eventually I opted to create a 3d sinusoidal
> > and concatenate this with its inverse as a means for a "next best"
> > situation. It seems that this isn't sufficient for my needs and I'm
> > after creating a continuous 3d gaussian mesh with a "positive" and
> > "negative" dipole.
> The names you're using don't mean anything to me; perhaps there just
> aren't enough atmospheric scientists on the list and that's why you
> didn't get any response. If you don't get a response this time, you
> should describe what you want in basic terms, and/or point to examples
> of it on the web.
> Duncan Murdoch
> > Can anyone offer any pointers at all?
> > Laura Quinn
> > Institute of Atmospheric Science
> > School of Earth and Environment
> > University of Leeds
> > Leeds
> > LS2 9JT
> > tel: +44 113 343 1596
> > fax: +44 113 343 6716
> > mail: laura at env.leeds.ac.uk
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide!
R-help at stat.math.ethz.ch mailing list
PLEASE do read the posting guide!
More information about the R-help