library(oce)
## Not run:
# ## secchi depths in lat and lon bins
# if (require(ocedata)) {
# data(secchi, package="ocedata")
# col <- rev(oce.colorsJet(100))[rescale(secchi$depth,
# xlow=0, xhigh=20,
# rlow=1, rhigh=100)]
# zlim <- c(0, 20)
# breaksPalette <- seq(min(zlim), max(zlim), 1)
# colPalette <- rev(oce.colorsJet(length(breaksPalette)-1))
# drawPalette(zlim, "Secchi Depth", breaksPalette, colPalette)
# data(coastlineWorld)
# mapPlot(coastlineWorld, longitudelim=c(-5,20), latitudelim=c(50,66),
# grid=5, fill='gray', projection="+proj=lcc +lat_1=50 +lat_2=65")
# bc <- binApply2D(secchi$longitude, secchi$latitude,
# pretty(secchi$longitude, 80),
# pretty(secchi$latitude, 40),
# f=secchi$depth, FUN=mean)
# mapImage(bc$xmids, bc$ymids, bc$result, zlim=zlim, col=colPalette)
# mapPolygon(coastlineWorld, col='gray')
# }
# ## End(Not run)
Run the code above in your browser using DataLab