Package: ggspectra 0.4.0

ggspectra: Extensions to 'ggplot2' for Radiation Spectra

Additional annotations, stats, geoms and scales for plotting "light" spectra with 'ggplot2', together with specializations of ggplot() and autoplot() methods for spectral data and waveband definitions stored in objects of classes defined in package 'photobiology'. Part of the 'r4photobiology' suite, Aphalo P. J. (2015) <doi:10.19232/uv4pb.2015.1.14>.

Authors:Pedro J. Aphalo [aut, cre], Titta K. Kotilainen [ctb]

ggspectra_0.4.0.tar.gz
ggspectra_0.4.0.zip(r-4.7)ggspectra_0.4.0.zip(r-4.6)ggspectra_0.4.0.zip(r-4.5)
ggspectra_0.4.0.tgz(r-4.6-any)ggspectra_0.4.0.tgz(r-4.5-any)
ggspectra_0.4.0.tar.gz(r-4.7-any)ggspectra_0.4.0.tar.gz(r-4.6-any)
ggspectra_0.4.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
ggspectra/json (API)

# Install 'ggspectra' in R:
install.packages('ggspectra', repos = c('https://aphalo.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/aphalo/ggspectra/issues

Pkgdown/docs site:https://docs.r4photobiology.info

On CRAN:

Conda:

datavizggplot2-autoplotggplot2-enhancementesggplot2-geomsggplot2-scalesggplot2-statslightr4photobiology-suiteradiationspectra

8.20 score 6 stars 1 packages 368 scripts 783 downloads 1 mentions 135 exports 43 dependencies

Last updated from:d08155bbcb. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK204
source / vignettesOK274
linux-release-x86_64OK352
macos-release-arm64OK147
macos-oldrel-arm64OK123
windows-develOK222
windows-releaseOK164
windows-oldrelOK164
wasm-releaseOK123

Exports:A_internal_labelA_labelA_total_labelAfr_labelautotitleaxis_labelsaxis_labels_noneaxis_labels_ukblack_or_whitecolor_chartcounts_labelcps_labelexponent2factorexponent2prefixexponent2prefix_namegeom_spctGeomSpctggtitle_spcthas_SI_prefixmultipliers_labelmultiplotnearest_SI_exponentprefix_name2exponentprefix2exponentRfr_labelRfr_specular_labelRfr_total_labels.e.action_labels.e.irrad_labels.e.response_labels.q.action_labels.q.irrad_labels.q.response_labelscale_x_energy_eV_continuousscale_x_energy_J_continuousscale_x_frequency_continuousscale_x_wavenumber_continuousscale_x_wl_continuousscale_y_A_continuousscale_y_A_internal_continuousscale_y_A_total_continuousscale_y_Afr_continuousscale_y_counts_continuousscale_y_counts_tg_continuousscale_y_cps_continuousscale_y_multipliers_continuousscale_y_Rfr_continuousscale_y_Rfr_specular_continuousscale_y_Rfr_total_continuousscale_y_s.e.action_continuousscale_y_s.e.irrad_continuousscale_y_s.e.irrad_log10scale_y_s.e.response_continuousscale_y_s.q.action_continuousscale_y_s.q.irrad_continuousscale_y_s.q.irrad_log10scale_y_s.q.response_continuousscale_y_Tfr_continuousscale_y_Tfr_internal_continuousscale_y_Tfr_total_continuoussec_axis_energy_eVsec_axis_energy_Jsec_axis_w_frequencysec_axis_w_numbersec_axis_wlset_annotations_defaultset_axis_symbols_defaultset_markup_format_defaultset_pc_out_defaultset_plot_range_defaultset_w.band_defaultSI_pl_formatSI_plainSI_taggedSI_tg_formatstat_colorstat_find_qtysstat_find_wlsstat_label_peaksstat_label_valleysstat_peaksstat_spikesstat_valleysstat_wb_boxstat_wb_columnstat_wb_contributionstat_wb_e_irradstat_wb_e_sirradstat_wb_hbarstat_wb_irradstat_wb_labelstat_wb_meanstat_wb_q_irradstat_wb_q_sirradstat_wb_relativestat_wb_sirradstat_wb_totalstat_wl_stripstat_wl_summaryStatColorStatColorGuideStatColorGuideGStatFindQtyStatFindWlsStatLabelPeaksStatLabelValleysStatPeaksStatSpikesStatValleysStatWbBoxStatWbBoxGStatWbColumnStatWbContribStatWbHbarStatWbIrradStatWbLabelStatWbLabelGStatWbMeanStatWbRelativeStatWbSIrradStatWbTotalStatWlSummarysubtitle_spct.generic_spctTfr_internal_labelTfr_labelTfr_total_labeltitle_spctw_energy_eV_labelw_energy_J_labelw_frequencyw_frequency_labelw_length_labelw_numberw_number_labelwl_guide

Dependencies:bitopscaToolsclicpp11dplyrfarvergenericsggplot2ggrepelgluegtableisobandlabelinglatticelifecyclelubridatemagrittrphotobiologyphotobiologyWavebandspillarpkgconfigplyrpolynompurrrR6RColorBrewerRcpprlangS7scalessplus2RstringistringrSunCalcMeeustibbletidyrtidyselecttimechangeutf8vctrsviridisLitewithrzoo

User Guide: 1 Grammar of Graphics
Introduction | What are autoplot() method specializations for? | What are ggplot specializations for? | What are the different stats useful for? | What is geom_spct useful for? | What are the new scales for? | What are functions color_chart() and black_or_white() for? | What is method autotitle() for? | How can defaults be modified? | Set up | ggplot() methods for spectra | ggplot() methods for collections fof spectra | Scales | Shared features | Wavelength | Raw counts | Counts per second | Spectral irradiance | Response and action | Transmittance | Absorbance | Absorptance | Reflectance | Stats | Peaks, valleys and target values | Color from wavelength | Averages and similar summaries | Summaries producing graphical elements | Name labels | Summaries by wavelength range | Means by waveband | Totals by waveband | Irradiances by waveband | Spectral irradiances by waveband | Labels from wavebands | Wavelength colours at new x-values | Multiple stats in the same plot | Geometries | Packaged stats, geoms plus scales | wl_guide | Color charts | Changing defaults | Using options to change default arguments | Using 'ggplot2' themes

Last update: 2026-03-17
Started: 2017-07-04

User Guide: 2 Autoplot Methods
Introduction | Using the autoplot() methods | The basics | Wavelengths | Normalization | "Parallel" summaries | Summary quantities by waveband | Automatic annotations | Handling of off-range data | Editing plots and adding layers | Ploting wavebands

Last update: 2026-03-17
Started: 2019-02-19

User Guide: 0 The R for Photobiology Suite
Introduction | References | Packages in the suite | Acknowledgements

Last update: 2025-08-14
Started: 2022-10-15

Readme and manuals

Help Manual

Help pageTopics
ggspectra: Extensions to 'ggplot2' for Radiation Spectraggspectra-package ggspectra
Absorbance axis labelsA_internal_label A_label A_total_label
Absorptance axis labelsAfr_label Rfr_total_label
Plot one or more irradiance-calibration spectra.autoplot.calibration_mspct autoplot.calibration_spct
Plot one or more detector-counts-per-second spectra.autoplot.cps_mspct autoplot.cps_spct
Plot one or more "filter" spectra.autoplot.filter_mspct autoplot.filter_spct
Plot one or more "object" spectra.autoplot.object_mspct autoplot.object_spct
Plot one or more raw-detector-counts spectra.autoplot.raw_mspct autoplot.raw_spct
Plot one or more reflector spectra.autoplot.reflector_mspct autoplot.reflector_spct
Plot one or more response spectra.autoplot.response_mspct autoplot.response_spct
Plot one or more light-source spectra.autoplot.source_mspct autoplot.source_spct
Create a complete ggplot for a waveband descriptor.autoplot.waveband
Add title, subtitle and caption to a spectral plotautotitle ggtitle_spct
Default text for axis labelsaxis_labels axis_labels_none axis_labels_uk
Chose black vs. white color based on weighted mean of RGB channelsblack_or_white
Create a color checker chartcolor_chart
Raw-counts axis labelscounts_label
Counts-per-second axis labelscps_label
SI unit prefixesexponent2factor exponent2prefix exponent2prefix_name has_SI_prefix nearest_SI_exponent prefix2exponent prefix_name2exponent
Spectral data plots.geom_spct
Create a new ggplot plot from spectral data.ggplot ggplot.calibration_spct ggplot.cps_spct ggplot.filter_mspct ggplot.filter_spct ggplot.generic_mspct ggplot.generic_spct ggplot.object_mspct ggplot.object_spct ggplot.raw_spct ggplot.reflector_spct ggplot.response_spct ggplot.source_mspct ggplot.source_spct
Calibration multipliers axis labelsmultipliers_label
Multiple plot functionmultiplot
Deprecated plot methodsplot.generic_mspct plot.generic_spct plot.waveband
Reflectance axis labelsRfr_label Rfr_specular_label
Spectral irradiance axis labelss.e.irrad_label s.q.irrad_label
spectral response and action axis labelss.e.action_label s.e.response_label s.q.action_label s.q.response_label
Energy per photon x-scalescale_x_energy_eV_continuous scale_x_energy_J_continuous
Frequency x-scalescale_x_frequency_continuous
Wavenumber x-scalescale_x_wavenumber_continuous
Wavelength x-scalescale_x_wl_continuous
Absorbance y-scalescale_y_A_continuous scale_y_A_internal_continuous scale_y_A_total_continuous
Absorptance y-scalescale_y_Afr_continuous
Raw-counts y-scalescale_y_counts_continuous scale_y_counts_tg_continuous
Counts-per-second y-scalescale_y_cps_continuous
Calibration multipliers y-scalescale_y_multipliers_continuous
Reflectance y-scalescale_y_Rfr_continuous scale_y_Rfr_specular_continuous scale_y_Rfr_total_continuous
Spectral irradiance y-scalescale_y_s.e.irrad_continuous scale_y_s.e.irrad_log10 scale_y_s.q.irrad_continuous scale_y_s.q.irrad_log10
Spectral response and action y-scalesscale_y_s.e.action_continuous scale_y_s.e.response_continuous scale_y_s.q.action_continuous scale_y_s.q.response_continuous
Transmittance y-scalescale_y_Tfr_continuous scale_y_Tfr_internal_continuous scale_y_Tfr_total_continuous
Secondary axes for wavelengthssec_axis_energy_eV sec_axis_energy_J sec_axis_wl sec_axis_w_frequency sec_axis_w_number
Set defaults for plottingset_annotations_default set_axis_symbols_default set_markup_format_default set_pc_out_default set_plot_range_default set_w.band_default
Formatter for plain labels discounting for SI multipliersSI_plain SI_pl_format
Formatter for tagged labels using SI multipliersSI_tagged SI_tg_format
Calculate colours from wavelength.stat_color
Find quantity value for target wavelength value.stat_find_qtys
Find wavelength for target quantity value.stat_find_wls
Label peaks and valleys.stat_label_peaks stat_label_valleys
Find peaks and valleys.stat_peaks stat_valleys
Find spikesstat_spikes
Draw colour boxes for wavebandsstat_wb_box
Integrate ranges under curve.stat_wb_column
Integrate ranges under spectral curve.stat_wb_contribution
Integrate ranges under curve.stat_wb_hbar
Integrate irradiance for wavebands.stat_wb_e_irrad stat_wb_irrad stat_wb_q_irrad
Label ranges under spectral curve.stat_wb_label
Integrate ranges under curve.stat_wb_mean
Integrate ranges under spectral curve.stat_wb_relative
Integrate spectral irradiance for wavebands.stat_wb_e_sirrad stat_wb_q_sirrad stat_wb_sirrad
Integrate ranges under spectral curve.stat_wb_total
Calculate colours from wavelength.stat_wl_strip wl_guide
Average area under curve for regions.stat_wl_summary
Transmittance axis labelsTfr_internal_label Tfr_label Tfr_total_label
Wave- axis labelsw_energy_eV_label w_energy_J_label w_frequency_label w_length_label w_number_label
Deprecated functionsw_frequency w_number