Spectral response and action y-scales
Source:R/axis-utils-response-spct.R
scale_y_s.e.response_continuous.Rd
Scale y continuous with defaults suitable for response and action spectra.
Usage
scale_y_s.e.response_continuous(
unit.exponent = 0,
name = s.e.response_label(unit.exponent = unit.exponent, format = format, label.text =
label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = -unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = axis_labels()[["s.e.response"]],
scaled = FALSE,
normalized = FALSE,
axis.symbols = getOption("ggspectra.axis.symbols", default = TRUE),
...
)
scale_y_s.q.response_continuous(
unit.exponent = 0,
name = s.q.response_label(unit.exponent = unit.exponent, format = format, label.text =
label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = -unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = axis_labels()[["s.q.response"]],
scaled = FALSE,
normalized = FALSE,
axis.symbols = getOption("ggspectra.axis.symbols", default = TRUE),
...
)
scale_y_s.e.action_continuous(
unit.exponent = 0,
name = s.e.action_label(unit.exponent = unit.exponent, format = format, label.text =
label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = -unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = axis_labels()[["s.e.action"]],
scaled = FALSE,
normalized = FALSE,
axis.symbols = getOption("ggspectra.axis.symbols", default = TRUE),
...
)
scale_y_s.q.action_continuous(
unit.exponent = 0,
name = s.q.action_label(unit.exponent = unit.exponent, format = format, label.text =
label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = -unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = axis_labels()[["s.q.action"]],
scaled = FALSE,
normalized = FALSE,
axis.symbols = getOption("ggspectra.axis.symbols", default = TRUE),
...
)
Arguments
- unit.exponent
integer
- name
The name of the scale, used for the axis-label.
- labels
The tick labels or a function to generate them.
- format
character string, "R", "R.expression", "R.character", or "LaTeX".
- label.text
character Textual portion of the labels.
- scaled
logical If
TRUE
relative units are assumed.- normalized
logical (
FALSE
) or numeric Normalization wavelength in manometers (nm).- axis.symbols
logical If
TRUE
symbols of the quantities are added to thename
. Supported only byformat = "R.expression"
.- ...
other named arguments passed to
scale_y_continuous
Note
This function only alters two default arguments, please, see
documentation for scale_continuous
.
Examples
ggplot(ccd.spct) +
geom_line() +
scale_y_s.e.action_continuous() + # per joule
scale_x_wl_continuous()
ggplot(ccd.spct) +
geom_line() +
scale_y_s.e.response_continuous() + # per joule
scale_x_wl_continuous()
ggplot(ccd.spct) +
geom_line() +
scale_y_s.e.response_continuous(unit.exponent = 6) + # per mega joule
scale_x_wl_continuous()
ggplot(ccd.spct, unit.out = "photon") +
geom_line() +
scale_y_s.q.response_continuous() + # per mol
scale_x_wl_continuous()
ggplot(ccd.spct, unit.out = "photon") +
geom_line() +
scale_y_s.q.response_continuous(unit.exponent = 3) + # per 1000 moles
scale_x_wl_continuous()
norm_ccd.spct <- normalize(ccd.spct, norm = "max")
ggplot(norm_ccd.spct) +
geom_line() +
scale_y_s.e.response_continuous(normalized = getNormalized(norm_ccd.spct)) +
scale_x_wl_continuous()
ggplot(norm_ccd.spct) +
geom_line() +
scale_y_s.e.response_continuous(normalized =
normalization(norm_ccd.spct)$norm.type) +
scale_x_wl_continuous()
photon_as_default()
norm_ccd.spct <- normalize(ccd.spct, norm = "max")
ggplot(norm_ccd.spct) +
geom_line() +
scale_y_s.q.response_continuous(normalized = getNormalized(norm_ccd.spct)) +
scale_x_wl_continuous()
ggplot(norm_ccd.spct) +
geom_line() +
scale_y_s.q.response_continuous(unit.exponent = 2,
normalized = getNormalized(norm_ccd.spct)) +
scale_x_wl_continuous()
unset_radiation_unit_default()