[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-help
Subject:    Re: [R] complicated graphic -- persp+map
From:       Duncan Murdoch <murdoch.duncan () gmail ! com>
Date:       2010-10-31 20:33:50
Message-ID: 4CCDD2AE.7010904 () gmail ! com
[Download RAW message or body]

On 31/10/2010 1:29 PM, claudia tebaldi wrote:
> Hello
>
> I'm trying to render in 3D what I usually plot by image(), or image.plot()
> from the library fields, followed by a map("world",add=TRUE) type of
> command. More concretely, I have a field of temperature values, for a given
> geographic area, and I would like to plot a 3D surface whose x and y axes
> consist of longitude and latitude values and whose height and color-coding
> correspond to the temperature values but also -- and here is the problem --
> superimpose a map of the region.
> persp() can easily do the color-coded surface but I cannot figure out how
> (if at all possible) to overlay geographic boundaries, in this specific case
> a simple map of the land area outlines.

This is possible in rgl; see example(persp3d).  (This is working in R 
2.11.1, but not in the CRAN build of R 2.12.0 at the moment.  If you 
build it yourself it works there.)

Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic