cmap | R Documentation |
list holding different color maps that can be used in image plots (see: v, get.bathy, image, image.plots, clim_plot)
available color maps are: ano
, bathy
, blue
, chla
, haxby
, jet
(obtained from matlab), rainbow
, red
, orange
, green
, sst
and haxbyrev
.
data(cmap)
data(cmap_topo)
list
Robert K. Bauer
data('cmap') # load color maps data
names(cmap) # list available color maps
path <- system.file("test_files", package="oceanmap")
gz.files <- Sys.glob(paste0(path,'/*.gz')) # load sample-'.gz'-files
# figure(width=15,height=15)
# par(mfrow=c(4,5))
# for(n in names(cmap)) v(gz.files[2], v_area='lion', subplot=TRUE,
# pal=n, adaptive.vals=TRUE, main=n)
## simple example of the \link{image}-function
x <- 10*(1:nrow(volcano))
y <- 10*(1:ncol(volcano))
image(x, y, volcano, col = terrain.colors(100))
image(x, y, volcano, col = cmap$jet) # jet color map
image(x, y, volcano, col = cmap$haxby) # haxby color map
image(x, y, volcano, col = cmap$chla) # chlorophyll color map
image(x, y, volcano, col = cmap$sst) # sst color map
data(cmap_topo)
image(x, y, volcano, col = cmap_topo$col) # topography color map
## another example: plot bathymetry and topography of the western Mediterranean Sea
#get.bathy("medw4",visualize=T,terrain=T,res=3)
#get.bathy("medw4",visualize=T,terrain=F,res=3,levels=c(200,2000)) # show contours
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.