Description Usage Arguments Details Value Author(s) See Also Examples
Control facetting parameters in plot made with function ggplot
of hyperSpec
(ggplot.hyperSpec
method)
in which parameter wl.range
is explicitly specified.
1 |
rows |
Name of factor variable (quoted string) to be used for making rows of facets. The dot "." (default) is used to indicate that there should be no faceting on this dimension. |
space |
If |
scales |
Are scales shared across all facets (the default,
|
... |
Further parameters to be passed to |
This function is a wrapper for facet_grid
and
facet_grid(.~.wl.range)
can be used instead of facet_wl(".")
.
Updated ggplot2 object of class ggplot
.
Vilmantas Gegzna
Function facet_grid
from package ggplot2.
Other spPlot functions for spectroscopy and hyperSpec:
ggLims()
,
gg_palette()
,
ggplot.hyperSpec()
,
label_expr2text()
Other spPlot functions for ggplot2:
ggLims()
,
gg_palette()
,
ggplot.hyperSpec()
,
nTick
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(spPlot)
p <- ggplot(Spectra2, wl.range = c(min ~ 350, 500~600)) +
geom_line(aes(color = gr))
p
p + facet_wl(space = "fixed")
p + facet_wl("class")
p + facet_wl("gr")
# Alternative to `facet_wl()` is:
p + facet_grid(. ~ .wl.range, scales = "free")
## Not run:
# If `wl.range` is not specified, ERROR message is displayed:
p2 <- ggplot(Spectra2) + geom_line(aes(color = gr))
p2 + facet_wl()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.