[R] calling map() in xyplot()
Felix Andrews
felix at nfrac.org
Wed Mar 10 05:37:29 CET 2010
It seems to draw some islands... looks OK to me... what exactly is the problem?
Note, you probably want to specify aspect="iso"
On 10 March 2010 14:42, Gurmeet <r.emailing.list at gmail.com> wrote:
> Hi All,
>
> I'm trying to add a map on the following lattice plot, but not correctly...
> can anyone help please...
>
> R Code:
>
> require(lattice)
> us.map <- map(plot = FALSE, fill = TRUE)
> Depth <- equal.count(quakes$depth, number=8, overlap=.1)
> xyplot(lat ~ long | Depth, data = quakes,
> panel = function(...) {
> panel.polygon(us.map$x,us.map$y)
> panel.xyplot(...)
> }
> )
>
> Any help would be greatly appreciated,
> Gurmeet
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>
--
Felix Andrews / 安福立
Postdoctoral Fellow
Integrated Catchment Assessment and Management (iCAM) Centre
Fenner School of Environment and Society [Bldg 48a]
The Australian National University
Canberra ACT 0200 Australia
M: +61 410 400 963
T: + 61 2 6125 4670
E: felix.andrews at anu.edu.au
CRICOS Provider No. 00120C
--
http://www.neurofractal.org/felix/
More information about the R-help
mailing list