Learn R Programming

oce (version 0.9-14)

mapPoints: Plot points on a existing map

Description

Plot points on an existing map

Usage

mapPoints(longitude, latitude, ...)

Arguments

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 mapLocator), in which case the
latitude
latitudes of points to be plotted
...
optional arguments passed to points.

Details

Adds points to an existing map, by analogy to points.

See Also

See mapPlot for general information on plotting maps, including other functions.

Examples

Run this code
library(oce)
data(coastlineWorld)
mapPlot(coastlineWorld, type='l', grid=TRUE,
longitudelim=c(-80,0), latitudelim=c(20,50),
projection="mercator", orientation=c(90,-40,0))
lon <- section[["longitude", 'byStation']]
lat <- section[["latitude", 'byStation']]
mapPoints(lon, lat, pch=20, col='red')

Run the code above in your browser using DataLab