Generate pixel response rate axis labels in cps units. Output can be selected as character, expression (R default devices) or LaTeX (for tikz device).
Usage
cps_label(
unit.exponent = 0,
format = getOption("photobiology.math", default = "R.expression"),
label.text = axis_labels(append = ifelse(axis.symbols, ",", ""))[["cps"]],
scaled = FALSE,
normalized = FALSE,
axis.symbols = getOption("ggspectra.axis.symbols", default = TRUE)
)Arguments
- unit.exponent
integer
- format
character string, "R", "R.expresion", "R.character", or "LaTeX".
- label.text
character Textual portion of the labels.
- scaled
logical If
TRUErelative units are assumed.- normalized
logical (
FALSE) or numeric Normalization wavelength in manometers (nm).- axis.symbols
logical If
TRUEsymbols of the quantities are added to thename. Supported only byformat = "R.expression".
Examples
cps_label()
#> "Pixel response rate," ~ italic(n)[lambda] ~ (plain(counts) ~
#> s^{
#> -1
#> })
cps_label(3)
#> "Pixel response rate," ~ italic(n)[lambda] ~ (10^{
#> 3
#> } * plain(counts) ~ s^{
#> -1
#> })
cps_label(format = "R.expression")
#> "Pixel response rate," ~ italic(n)[lambda] ~ (plain(counts) ~
#> s^{
#> -1
#> })
cps_label(format = "R.character")
#> [1] "Pixel response rate, n(lambda) (counts/s)"
cps_label(format = "LaTeX")
#> [1] "Pixel response rate, $n_{\\lambda}$ (counts~s$^{-1}$)"
cps_label(3, format = "LaTeX")
#> [1] "Pixel response rate, $n_{\\lambda}$ ($\\times 10^{3}$ counts~s$^{-1}$)"
