get.cb.pos | R Documentation |
Returns colorbar ticks length, label-, cb.title- and cb.xlab-position. ticks.lab, cb.title and cb.lab are horizontally centered, so only the y-value is returned.
get.cb.pos(cbx,cby,oticks)
cbx |
the horizontal limits (x1, x2) of the colorbar. |
cby |
the vertical limits (y1, y2) of the colorbar. |
oticks |
letter defining alignment of colorbar ticks and labels. Allowed values are: |
Robert K. Bauer
set.colorbar, cust.colorbar, region_definitions
path <- system.file("test_files", package="oceanmap")
gz.files <- Sys.glob(paste0(path,'/*.gz')) # load sample-'.gz'-files
obj <- readbin(gz.files[2],area='lion')
ncorse <- crop(obj,extent(6,9,40,42))
cbx <-c(8.3,8.9)
cby <- c(40.7,40.8)
v(ncorse,zlim=c(20,30),cbx=cbx,cby=cby) # skipping colorbar widget
get.cb.pos(cbx=cbx,cby=cby,oticks="b")
#dev.new()
#image(obj)
#align <- set.colorbar()
#get.cb.pos(cbx=align$cbx,cby=align$cby,oticks=align$oticks)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.