Learn R Programming

oce (version 0.9-5)

mapImage: Plot an image on a existing map

Description

Plot an image on an existing map

Usage

mapImage(longitude, latitude, z)

Arguments

longitude
longitudes of points to be plotted
latitude
latitudes of points to be plotted
z
matrix for image

Bugs

More arguments need to be added, e.g. for the colour mapping, etc.

Details

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

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',
        latitudelim=c(40,50), longitudelim=c(-70,-50),
        proj="polyconic", orientation=c(90, -90,0), grid=TRUE)
data(topoMaritimes)
look <- seq(1, 600, 10)
tlon <- topoMaritimes[['longitude']][look]
tlat <- topoMaritimes[['latitude']][look]
z <- topoMaritimes[['z']][look, look]
mapImage(tlon, tlat, z)
mapMeridians(10, lty='dotted', col='darkgray')
mapZones(10, lty='dotted', col='darkgray')
mapLines(coastlineWorld)

Run the code above in your browser using DataLab