RLum.Data.Spectrum or matrix (required): S4
object of class RLum.Data.Spectrum or a matrix containing count values of the spectrum.
Please note that in case of a matrix rownames and colnames are set automatically if not provided.
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 interactive, for a 2D-plot contour,
single or multiple.lines (along the time or temperature axis)
or transect (along the wavelength axis)
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 and
single
limit_counts
numeric (optional): value to limit all count values to
this value, i.e. all count values above this threshold will be replaced by this threshold. This
is helpfull especially in case of TL-spectra.
xaxis.energy
logical (with default): enables or
disables energy instead of wavelength axis. Note: This option means not only
simnply redrawing the axis, insteadly the spectrum in terms of intensity is
recalculated, s. details.
legend.text
character (with default): possiblity to
provide own legend text. This argument is only considered for plot types
providing a legend, e.g. plot.type="transect"
...
further arguments and graphical parameters that will be passed
to the plot function.
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
Energy axis re-calculation
If the argument xaxis.energy = TRUE is chosen, instead intensity vs.
wavelength the spectrum is plotted as intensiyt vs. energy. Therefore the
entire spectrum is re-recaluated (e.g., Appendix 4 in Blasse and Grabmeier,
1994):
The intensity of the spectrum (z-values) is re-calcualted using the
following equation:
φ_{E} = φ_{λ} * λ^2 / (hc)
with φ_{E} the intensity per interval of energy E (eV),
φ_{λ} the intensity per interval of wavelength λ
(nm) and h (eV/s) the Planck constant and c (m/s) the velocity
of light.
For transforming the wavelength axis (x-values) the equation
E = hc/λ
is used. For further details please see the cited the literature.
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 is 0.4
phi: default is 15
theta: default is -30
expand: default is
1
ticktype: default is detailed, r: default is 10
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 plotted 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)
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(Luminescence)
Welcome to the R package Luminescence version 0.6.0 [Built: 2016-05-30 16:47:30 UTC]
Anonymous student hotel employee: 'Let me double check this.'
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Luminescence/plot_RLum.Data.Spectrum.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plot_RLum.Data.Spectrum
> ### Title: Plot function for an RLum.Data.Spectrum S4 class object
> ### Aliases: plot_RLum.Data.Spectrum
> ### Keywords: aplot
>
> ### ** Examples
>
>
>
> ##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)
Warning message:
In plot_RLum.Data.Spectrum(TL.Spectrum, plot.type = "contour", xlim = c(310, :
Last wavelength channel has been removed due to binning.
>
> ##(2) plot spectrum (3D)
> plot_RLum.Data.Spectrum(TL.Spectrum,
+ plot.type="persp",
+ xlim = c(310,750),
+ ylim = c(0,100),
+ bin.rows=10,
+ bin.cols = 1)
Warning message:
In plot_RLum.Data.Spectrum(TL.Spectrum, plot.type = "persp", xlim = c(310, :
Last wavelength channel has been removed due to binning.
>
> ##(3) plot multiple lines (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)
Warning message:
In plot_RLum.Data.Spectrum(TL.Spectrum, plot.type = "multiple.lines", :
Last wavelength channel has been removed due to binning.
>
> ## Not run:
> ##D ##(4) interactive plot using the package plotly
> ##D plot_RLum.Data.Spectrum(TL.Spectrum, plot.type="interactive",
> ##D xlim = c(310,750), ylim = c(0,300), bin.rows=10,
> ##D bin.cols = 1)
> ##D
> ##D ##(5) alternative using the package fields
> ##D fields::image.plot(get_RLum(TL.Spectrum))
> ##D contour(get_RLum(TL.Spectrum), add = TRUE)
> ##D
> ## End(Not run)
>
>
>
>
>
>
> dev.off()
null device
1
>