ggspectra (version 0.3.2)

scale_x_wl_continuous: Wavelength x-scale

Description

Scale x continuous with defaults suitable for wavelengths in nanometres.

Usage

scale_x_wl_continuous(unit.exponent = -9,
  name = w_length_label(unit.exponent = unit.exponent),
  breaks = scales::pretty_breaks(n = 7), labels = SI_pl_format(exponent
  = unit.exponent + 9), ...)

Arguments

unit.exponent

integer

name

The name of the scale, used for the axis-label.

breaks

The positions of ticks or a function to generate them.

labels

The tick labels or a function to generate them from the tick positions.

...

other named arguments passed to scale_y_continuous

Examples

Run this code
# NOT RUN {
ggplot(sun.spct) +
  geom_line() +
  scale_x_wl_continuous()

ggplot(sun.spct) +
  geom_line() +
  scale_x_wl_continuous(-6)

ggplot(sun.spct) +
  geom_line() +
  scale_x_wl_continuous(sec.axis = sec_axis_w_number())

ggplot(sun.spct) +
  geom_line() +
  scale_x_wl_continuous(unit.exponent = -6,
                        sec.axis = sec_axis_w_number())

# }

Run the code above in your browser using DataCamp Workspace