plot.vs_decomp: Plot Method for 'vs_decomp' Objects

Description Usage Arguments Value

View source: R/plot.R

Description

Plot Method for 'vs_decomp' Objects

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'vs_decomp'
plot(
  x,
  plot.comp = NULL,
  comp.labels = NULL,
  fill.colors = NULL,
  trunc.negative = TRUE,
  ...
)

Arguments

x

a 'vs_decomp' object.

plot.comp

a vector of up to 3 components to plot. can be either character with component names or numeric with component indices. other components not specified by plot.comp are summed to one additional component. default is to plot the first 3 components. another option is to additionally specify "all other terms" in order to control for the position of each component. (relevant only for the linear decomposition).

comp.labels

a vector of the same length as plot.comp, which provides the labels to be shown in the graph. default is to use the original component names. (relevant only for the linear decomposition).

fill.colors

colors to fill the areas. see scale_fill_manual for more details.

trunc.negative

whether to truncate negative values with 0. default is TRUE. this flag is necessary because geom_area, on which the function is based, does not work well with a combination of positive and negative values.

...

further arguments passed to or from other methods.

Value

A ggplot object containing all the relevant information for the plot.


VSdecomp documentation built on May 18, 2021, 9:06 a.m.