Learn R Programming

Luminescence (version 0.3.4)

plot_RLum.Data.Spectrum: Plot function for an RLum.Data.Spectrum S4 class object

Description

The function provides a standardised plot output for spectrum data of an RLum.Data.Spectrum S4 class object

Usage

plot_RLum.Data.Spectrum(object, par.local = TRUE, plot.type = "contour", 
    optical.wavelength.colours = TRUE, bg.channels, bin.rows = 1, 
    bin.cols = 1, ...)

Arguments

object
RLum.Data.Spectrum (required): S4 object of class RLum.Data.Spectrum
par.local
logical (with default): use local graphical parameters for plotting, e.g. the plot is shown in one column and one row. If par.local = FALSE global parameters are inherited.
plot.type
character (with default): plot type, for 3D-plot use persp, or persp3d, for a 2D-plot contour, single or multiple.lines along the time
optical.wavelength.colours
logical (with default): use optical wavelength colour palette. Note: For this, the spectrum range is limited: c(350,750). Own colours can be set with the argument col.
bg.channels
vector (optional): defines channel for background subtraction If a vector is provided the mean of the channels is used for subtraction. Note: Background subtraction is applied prior to channel binning
bin.rows
integer (with defaul): allow summing-up wavelength channels (horizontal binning), e.g. bin.rows = 2 two channels are summed up
bin.cols
integer (with default): allow summing-up channel counts (vertical binning) for plotting, e.g. bin.cols = 2 two channels are summed up
...
further arguments and graphical parameters that will be passed to the plot function.

Value

  • Returns a plot.

Function version

0.2.5 (2014-05-21 16:58:16)

Details

Spectrum is visualised as 3D or 2D plot. Both plot types are based on internal R plot functions. Arguments that will be passed to persp:
  • shade: default is0.4
  • phi: default is30
  • theta: default is30
  • expand: default is1
  • ticktype: default isdetailed
Further arguments that will be passed xlab, ylab, zlab, xlim, ylim, zlim, main, mtext, pch, type, border, box lwd plot.type = "single" Per frame a single curve is returned. Frames are time or temperature steps. plot.type = "multiple.lines" All frames drawn in one frame. Nomenclature xlim: Limits values along the wavelength axis ylim: Limits values along the time/temperature axis zlim: Limits values along the count value axis

References

#

See Also

RLum.Data.Spectrum, plot, plot_RLum, persp, persp3d, contour

Examples

Run this code
##load example data
data(ExampleData.XSYG, envir = environment())

##(1)plot simple spectrum (2D) - contour
plot_RLum.Data.Spectrum(TL.Spectrum, 
                        plot.type="contour", 
                        xlim = c(310,750), 
                        ylim = c(0,300),
                        bin.rows=10, 
                        bin.cols = 1)

##(2) plot simple spectrum (2D) - multiple.lines (with ylim)
plot_RLum.Data.Spectrum(TL.Spectrum, 
                        plot.type="multiple.lines", 
                        xlim = c(310,750), 
                        ylim = c(0,100),
                        bin.rows=10, 
                        bin.cols = 1)

##(3) plot 3d spectrum (uncomment for usage)
# plot_RLum.Data.Spectrum(TL.Spectrum, plot.type="persp", 
# xlim = c(310,750), ylim = c(0,300), bin.rows=10, 
# bin.cols = 1)

Run the code above in your browser using DataLab