| qplot_kAmp | R Documentation |
Plot amplitudes (a.k.a scores) of spectroscopic components
grouped by categorical variable by. Amplitudes are provided as
hyperSpec object.
qplot_kAmp(
scores,
Title = "Component amplitudes",
subTitle = NULL,
xLabel = labels(scores, ".wavelength"),
yLabel = labels(scores, "spc"),
by = "gr",
palette = hyGet_palette(scores),
add.violin = TRUE,
add.jitter = FALSE,
add.boxplot = TRUE,
violin.alpha = 0.25,
jitter.alpha = 0.3,
jitter.size = 1
)
qplot_scores(..., by = NULL, add.violin = FALSE)
scores |
An object of class |
Title |
The main title for the plot. |
subTitle |
The second line of title, which will be smaller and and in italics. |
xLabel |
A label for abscisa (x) axis. |
yLabel |
A label for ordinate (y) axis. |
by |
A name of grouping variable. If |
palette |
A color palette to be used in plotting. (...) |
add.violin |
Logical. If |
add.jitter |
Logical. If |
add.boxplot |
Logical. If |
violin.alpha |
Transperency of violin plot. |
jitter.alpha |
Transperency of jitter plot. |
jitter.size |
Point size in jitter plot. |
... |
(The same parameters as above). |
Plots are drawn in this order: violin plot, jitter plot, boxplot.
A ggplot object.
More details in package ggplot2.
If more information on matrix decomposition/factorisation is needed it can be found here or here).
Vilmantas Gegzna
Other spHelper plots:
check_palette(),
layer_spRangeMean(),
plot_colors(),
plot_hyPalette(),
plot_spCompare(),
plot_spDiff(),
plot_spDistribution(),
qplot_confusion(),
qplot_crosstab(),
qplot_infoDim(),
qplot_kSp(),
qplot_prediction(),
qplot_spRangeCenter(),
qplot_spRangeMedian(),
qplot_spStat(),
qplot_spc(),
rmExpr(),
rm_stripes(),
stat_chull()
Other component analysis / factorisation related functions in spHelper:
getScores(),
infoDim(),
plot_spDiff(),
qplot_infoDim(),
qplot_kSp(),
qplot_spc(),
reconstructSp(),
sortLoadings(),
unipeak(),
whichOutlier()
data(Scores2)
qplot_kAmp(Scores2)
qplot_scores(Scores2)
data(Scores3)
qplot_kAmp(Scores3, by = "class")
sp3 <- hyAdd_color(Scores3, "class")
qplot_kAmp(sp3, by = "class")
p <- qplot_scores(Scores2, add.jitter = TRUE)
p
p + theme_bw()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.