When filled.countour returns, the coordinate system does not match the
plot (part of drawing the scale). One of the easiest ways to add to the
plot is using the plot.axes argument. For example:
> library(maps)
> data(ozone)
>
> fit <- loess(median ~ x+y, data=ozone)
>
> tmp.x <- seq( min(ozone$x), max(ozone$x), length=25 )
> tmp.y <- seq( min(ozone$y), max(ozone$y), length=25 )
>
> z <- predict(fit, expand.grid(x=tmp.x, y=tmp.y))
> z <- matrix(z, ncol=25)
>
> filled.contour(tmp.x, tmp.y, z,
+ plot.axes=map('state',add=T)
+ )
>
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Thomas Szegvary
> Sent: Friday, June 15, 2007 6:34 AM
> To: [email protected]
> Subject: [R-sig-Geo] Adding map to filled.contour
>
> Hi there
>
> I have a filled.contour and want to add a the contours of a
> shapefile (i.e.
> European boarders). I tried to do this with the map library,
> but didn't succed using par(new=TRUE) to add the boundaries,
> the filled.contour is not a plot says R.
> What else can I do?
> Thanks,Thomas
>
>
>
> __
>
> Thomas Szegvary
> Institute of Environmental Geosciences
> Department of Geosciences
> University of Basel
> Bernoullistrasse 30
> CH - 4056 Basel
>
> Tel. 41-61-267 04 82
> Fax. 41-61-267 04 79
> Email: [EMAIL PROTECTED]
> www.radon.unibas.ch
> www.unibas.ch/environment
>
> _______________________________________________
> R-sig-Geo mailing list
> [email protected]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo