Learn R Programming

Luminescence (version 0.4.1)

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, rug = TRUE, xaxis.energy = FALSE, ...)

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 tim
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
rug
logical (with default): enables or disables colour rug. Currently only implemented for plot type multiple.lines.
xaxis.energy
logical (with default): enables or disables energy instead of wavelength axis. Axis labelling are changed accordingly, so far no manual axis labelling is choosen.
...
further arguments and graphical parameters that will be passed to the plot function.

Value

  • Returns a plot.

Function version

0.3.4 (2014-12-02 11:43:28)

Details

Matrix structure (cf. RLum.Data.Spectrum)
  • rows(x-values): wavelengths/channels (xlim, xlab)
  • columns(y-values): time/temperature (ylim, ylab)
  • cells(z-values): count values (zlim, zlab)
Note: This nomenclature is valid for all plot types of this function! Nomenclature for value limiting xlim: Limits values along the wavelength axis ylim: Limits values along the time/temperature axis zlim: Limits values along the count value axis Details on the plot functions Spectrum is visualised as 3D or 2D plot. Both plot types are based on internal R plot functions. plot.type = "persp" Arguments that will be passed to persp:
  • shade: default is0.4
  • phi: default is30
  • theta: default is30
  • expand: default is1
  • ticktype: default isdetailed
Note: Further parameters can be adjusted via par. For example to set the background transparent and reduce the thickness of the lines use: par(bg = NA, lwd = 0.7) previous the function call. 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. plot.type = "transect" Depending on the selected wavelength/channel range a transect over the time/temperature (y-axis) will be plotted along the wavelength/channels (x-axis). If the range contains more than one channel, values (z-values) are summed up. To select a transect use the xlim argument, e.g. xlim = c(300,310) plot along the summed up count values of channel 300 to 310. Further arguments that will be passed (depending on the plot type) xlab, ylab, zlab, xlim, ylim, zlim, main, mtext, pch, type, border, box lwd

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