mapPolygon {oce} | R Documentation |
Plot a polygon on an existing map
mapPolygon(longitude, latitude, density=NULL, angle=45, border=NULL, col=NA, lty=par('lty'), ..., fillOddEven=FALSE)
longitude |
longitudes of points to be plotted, or an object from
which longitude and latitude can be inferred (e.g. a coastline file, or
the return value from |
latitude |
latitudes of points to be plotted |
density |
as for |
angle |
as for |
border |
as for |
col |
as for |
lty |
as for |
... |
as for |
fillOddEven |
as for |
Adds a polygon to an existing map, by analogy to
polygon
. Used by mapImage
.
Dan Kelley
See mapPlot
for general information on plotting maps,
including other functions.
## Not run: library(oce) data(coastlineWorld) mapPlot(coastlineWorld, type='l', longitudelim=c(-70,-50), latitudelim=c(40,50), proj="polyconic", orientation=c(90, -90,0), grid=TRUE) data(topoWorld) tlon <- topoWorld[['longitude']][550:650] tlat <- topoWorld[['latitude']][240:300] z <- topoWorld[['z']][550:650, 240:300] mapImage(tlon, tlat, z) mapLines(coastlineWorld[['longitude']], coastlineWorld[['latitude']]) ## End(Not run)