Generate cps axis labels in SI units, using SI scale factors. Output can be selected as character, expression (R default devices) or LaTeX (for tikz device).
Usage
Tfr_label(
unit.exponent = ifelse(pc.out, -2, 0),
format = getOption("photobiology.math", default = "R.expression"),
label.text = NULL,
scaled = FALSE,
normalized = FALSE,
axis.symbols = getOption("ggspectra.axis.symbols", default = TRUE),
pc.out = getOption("ggspectra.pc.out", default = FALSE),
Tfr.type
)
Tfr_internal_label(
unit.exponent = 0,
format = getOption("photobiology.math", default = "R.expression"),
label.text = NULL,
scaled = FALSE,
normalized = FALSE,
axis.symbols = getOption("ggspectra.axis.symbols", default = TRUE)
)
Tfr_total_label(
unit.exponent = 0,
format = getOption("photobiology.math", default = "R.expression"),
label.text = NULL,
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".- pc.out
logical, if TRUE use percent as default instead of fraction of one.
- Tfr.type
character, either "total" or "internal".
Examples
Tfr_label(Tfr.type = "internal")
#> "Internal spectral transmittance," ~ tau[lambda] ~ plain("(/1)")
Tfr_label(Tfr.type = "total")
#> "Total spectral transmittance," ~ tau[lambda] ~ plain("(/1)")
Tfr_label(Tfr.type = "internal", axis.symbols = FALSE)
#> "Internal spectral transmittance" ~ plain("(/1)")
Tfr_internal_label()
#> "Internal spectral transmittance," ~ tau[lambda] ~ plain("(/1)")
Tfr_internal_label(format = "R.expression", axis.symbols = FALSE)
#> "Internal spectral transmittance" ~ plain("(/1)")
Tfr_internal_label(-2)
#> "Internal spectral transmittance," ~ tau[lambda] ~ plain("(%)")
Tfr_internal_label(-3)
#> "Internal spectral transmittance," ~ tau[lambda] ~ plain("(permil)")
Tfr_internal_label(format = "R.expression")
#> "Internal spectral transmittance," ~ tau[lambda] ~ plain("(/1)")
Tfr_internal_label(format = "LaTeX")
#> [1] "Internal spectral transmittance, $\\tau_{\\lambda}$ (/1)"
Tfr_internal_label(-3, format = "LaTeX")
#> [1] "Internal spectral transmittance, $\\tau_{\\lambda}$ (permil)"
Tfr_total_label()
#> "Total spectral transmittance," ~ tau[lambda] ~ plain("(/1)")
Tfr_total_label(format = "R.expression", axis.symbols = FALSE)
#> "Total spectral transmittance" ~ plain("(/1)")
Tfr_total_label(-2)
#> "Total spectral transmittance," ~ tau[lambda] ~ plain("(%)")
Tfr_total_label(-3)
#> "Total spectral transmittance," ~ tau[lambda] ~ plain("(permil)")
Tfr_total_label(format = "R.expression")
#> "Total spectral transmittance," ~ tau[lambda] ~ plain("(/1)")
Tfr_total_label(format = "LaTeX")
#> [1] "Total spectral transmittance, $\\tau_{\\lambda}$ (/1)"
Tfr_total_label(-3, format = "LaTeX")
#> [1] "Total spectral transmittance, $\\tau_{\\lambda}$ (permil)"
