get.cb.pos: Returns additional colorbar placement information

Description

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.

Usage

1
get.cb.pos(cbx,cby,oticks)

Arguments

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: 'b' for bottom, 'l' for left and 'r' for right alignment.

Author(s)

Robert K. Bauer

See Also

set.colorbar, cust.colorbar, region_definitions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
owd <- getwd()
setwd(system.file("test_files", package="oceanmap"))
gz.files <- Sys.glob('*.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)

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.