Package index
-
ggspectra
ggspectra-package
- ggspectra: Extensions to 'ggplot2' for Radiation Spectra
-
ggplot(<source_spct>)
ggplot(<response_spct>)
ggplot(<filter_spct>)
ggplot(<reflector_spct>)
ggplot(<cps_spct>)
ggplot(<calibration_spct>)
ggplot(<raw_spct>)
ggplot(<object_spct>)
ggplot(<generic_spct>)
ggplot(<generic_mspct>)
ggplot(<filter_mspct>)
ggplot(<source_mspct>)
ggplot(<object_mspct>)
- Create a new ggplot plot from spectral data.
-
geom_spct()
- Spectral data plots.
Layer: Statistics
It is often useful to summarize spectral data before plotting, and that is what these transformations do.
-
stat_color()
- Calculate colours from wavelength.
-
stat_find_qtys()
- Find quantity value for target wavelength value.
-
stat_find_wls()
- Find wavelength for target quantity value.
-
stat_peaks()
stat_valleys()
- Find peaks and valleys.
-
stat_label_peaks()
stat_label_valleys()
- Label peaks and valleys.
-
stat_spikes()
- Find spikes
-
stat_wb_box()
- Draw colour boxes for wavebands
-
stat_wb_hbar()
- Integrate ranges under curve.
-
stat_wb_column()
- Integrate ranges under curve.
-
stat_wb_contribution()
- Integrate ranges under spectral curve.
-
stat_wb_irrad()
stat_wb_e_irrad()
stat_wb_q_irrad()
- Integrate irradiance for wavebands.
-
stat_wb_label()
- Label ranges under spectral curve.
-
stat_wb_mean()
- Integrate ranges under curve.
-
stat_wb_relative()
- Integrate ranges under spectral curve.
-
stat_wb_sirrad()
stat_wb_e_sirrad()
stat_wb_q_sirrad()
- Integrate spectral irradiance for wavebands.
-
stat_wb_total()
- Integrate ranges under spectral curve.
-
stat_wl_strip()
wl_guide()
- Calculate colours from wavelength.
-
stat_wl_summary()
- Average area under curve for regions.
Scales
Scales control the mapping between data and aesthetics. The scales defined in package ‘ggspectra’ are continuous scales with defaults suitable for spectral data.
-
scale_x_wl_continuous()
- Wavelength x-scale
-
scale_x_wavenumber_continuous()
- Wavenumber x-scale
-
scale_x_frequency_continuous()
- Frequency x-scale
-
scale_x_energy_eV_continuous()
scale_x_energy_J_continuous()
- Energy per photon x-scale
-
scale_y_s.e.response_continuous()
scale_y_s.q.response_continuous()
scale_y_s.e.action_continuous()
scale_y_s.q.action_continuous()
- Spectral response and action y-scales
-
scale_y_s.e.irrad_continuous()
scale_y_s.q.irrad_continuous()
scale_y_s.e.irrad_log10()
scale_y_s.q.irrad_log10()
- Spectral irradiance y-scale
-
scale_y_A_continuous()
scale_y_A_internal_continuous()
scale_y_A_total_continuous()
- Absorbance y-scale
-
scale_y_Tfr_continuous()
scale_y_Tfr_internal_continuous()
scale_y_Tfr_total_continuous()
- Transmittance y-scale
-
scale_y_Rfr_continuous()
scale_y_Rfr_specular_continuous()
scale_y_Rfr_total_continuous()
- Reflectance y-scale
-
scale_y_Afr_continuous()
- Absorptance y-scale
-
scale_y_cps_continuous()
- Counts-per-second y-scale
-
scale_y_counts_continuous()
scale_y_counts_tg_continuous()
- Raw-counts y-scale
-
scale_y_multipliers_continuous()
- Calibration multipliers y-scale
-
sec_axis_w_number()
sec_axis_w_frequency()
sec_axis_energy_eV()
sec_axis_energy_J()
sec_axis_wl()
- Secondary axes for wavelengths
Automatic plot creation
Autoplot methods for spectra and a function for color-patch charts. They all return gg
objects.
-
autoplot(<raw_spct>)
autoplot(<raw_mspct>)
- Plot one or more raw-detector-counts spectra.
-
autoplot(<calibration_spct>)
autoplot(<calibration_mspct>)
- Plot one or more irradiance-calibration spectra.
-
autoplot(<cps_spct>)
autoplot(<cps_mspct>)
- Plot one or more detector-counts-per-second spectra.
-
autoplot(<source_spct>)
autoplot(<source_mspct>)
- Plot one or more light-source spectra.
-
autoplot(<response_spct>)
autoplot(<response_mspct>)
- Plot one or more response spectra.
-
autoplot(<filter_spct>)
autoplot(<filter_mspct>)
- Plot one or more "filter" spectra.
-
autoplot(<reflector_spct>)
autoplot(<reflector_mspct>)
- Plot one or more reflector spectra.
-
autoplot(<object_spct>)
autoplot(<object_mspct>)
- Plot one or more "object" spectra.
-
autoplot(<generic_spct>)
autoplot(<generic_mspct>)
- Plot generic spectral data.
-
autoplot(<waveband>)
- Create a complete ggplot for a waveband descriptor.
-
autotitle()
ggtitle_spct()
- Add title, subtitle and caption to a spectral plot
-
set_annotations_default()
set_w.band_default()
- Set defaults for autoplot annotations
-
color_chart()
- Create a color checker chart
-
black_or_white()
- Chose black vs. white color based on weighted mean of RGB channels
-
exponent2prefix()
exponent2factor()
exponent2prefix_name()
prefix_name2exponent()
prefix2exponent()
has_SI_prefix()
nearest_SI_exponent()
- SI unit prefixes
-
SI_pl_format()
SI_plain()
- Formatter for plain labels discounting for SI multipliers
-
SI_tg_format()
SI_tagged()
- Formatter for tagged labels using SI multipliers
-
w_number()
w_frequency()
- Deprecated functions
-
axis_labels_uk()
axis_labels_uk_comma()
axis_labels_none()
axis_labels()
- Default text for axis labels
-
w_length_label()
w_number_label()
w_frequency_label()
w_energy_eV_label()
w_energy_J_label()
- Wave- axis labels
-
counts_label()
- Raw-counts axis labels
-
cps_label()
- Counts-per-second axis labels
-
Rfr_label()
Rfr_specular_label()
- Reflectance axis labels
-
A_label()
A_internal_label()
A_total_label()
- Absorbance axis labels
-
Tfr_label()
Tfr_internal_label()
Tfr_total_label()
- Transmittance axis labels
-
Afr_label()
Rfr_total_label()
- Absorptance axis labels
-
s.e.irrad_label()
s.q.irrad_label()
- Spectral irradiance axis labels
-
s.e.response_label()
s.q.response_label()
s.e.action_label()
s.q.action_label()
- spectral response and action axis labels
-
multipliers_label()
- Calibration multipliers axis labels
-
multiplot()
- Multiple plot function
-
plot(<generic_spct>)
plot(<generic_mspct>)
plot(<waveband>)
- Deprecated plot methods