
mapText(longitude, latitude, labels, ...)
text
, e.g. adj
,
pos
, etc.text
.mapPlot
for general information on plotting maps,
including other functions.library(oce)
data(coastlineWorld)
longitude <- coastlineWorld[['longitude']]
latitude <- coastlineWorld[['latitude']]
mapPlot(longitude, latitude, type='l',
longitudelim=c(-70,-50), latitudelim=c(45,50),
projection="mercator", grid=1)
lon <- -63.5744 # Halifax
lat <- 44.6479
mapPoints(lon, lat, pch=20, col="red")
mapText(lon, lat, "Halifax", col="red", pos=1, offset=1)
Run the code above in your browser using DataLab