R: Provide axis names in adjustable sizes

resizableLabel {oce} | R Documentation

## Provide axis names in adjustable sizes

### Description

Provide axis names in adjustable sizes, e.g. using T instead of Temperature, and including units as appropriate. Used by e.g. `plot,ctd-method()`.

### Usage

    resizableLabel(
      item,
      axis = "x",
      sep,
      unit = NULL,
      debug = getOption("oceDebug")
    )

### Arguments

`item` | code for the label. The following common values are recognized: `"absolute salinity"`, `"along-spine distance km"`, `"along-track distance km"`, `"C"`, `"conductivity mS/cm"`, `"conductivity S/m"`, `"conservative temperature"`, `"CT"`, `"depth"`, `"direction"`, `"distance"`, `"distance km"`, `"eastward"`, `"elevation"`, `"fluorescence"`, `"frequency cph"`, `"heading"`, `"latitude"`, `"longitude"`, `"N2"`, `"nitrate"`, `"nitrite"`, `"northward"`, `"oxygen"`, `"oxygen mL/L"`, `"oxygen saturation"`, `"oxygen umol/kg"`, `"oxygen umol/L"`, `"p"`, `"phosphate"`, `"pitch"`, `"roll"`, `"S"`, `"SA"`, `"sigma0"`, `"sigma1"`, `"sigma2"`, `"sigma3"`, `"sigma4"`, `"sigmaTheta"`, `"silicate"`, `"sound speed"`, `"spectral density m2/cph"`, `"speed"`, `"spice"`, `"T"`, `"theta"`, `"tritium"`, `"u"`, `"v"`, `"w"`, or `"z"`. Other values may also be recognized, and if an unrecognized item is given, then it is returned, unaltered.
`axis` | a string indicating which axis to use; must be `x` or `y`.
`sep` | optional character string inserted between the unit and the parentheses or brackets that enclose it. If not provided, then `getOption``("oceUnitSep")` is checked. If that exists, then it is used as the separator; if not, no separator is used.
`unit` | optional unit to use, if the default is not satisfactory. This might be the case if for example temperature was not measured in Celcius.
`debug` | optional debugging flag. Setting to 0 turns off debugging, while setting to 1 causes some debugging information to be printed.

### Value

A character string or expression, in either a long or a shorter format, for use in the indicated axis at the present plot size. Whether the unit is enclosed in parentheses or square brackets is determined by the value of `getOption("oceUnitBracket")`, which may be `"["` or `"("`. Whether spaces are used between the unit and these deliminators is set by `psep` or `getOption``("oceUnitSep")`.

### Author(s)

Dan Kelley

### See Also

Other functions that create labels: `labelWithUnit()`

[Package oce version 1.7-2 Index]