plot-methods: Visualisation of data, collective and point anomalies.

plotR Documentation

Visualisation of data, collective and point anomalies.


Plot methods for S4 objects returned by capa, pass, and sampler.

The plot can either be a line plot or a tile plot, the type produced depending on the options provided to the plot function and/or the dimensions of the data associated with the S4 object.


## S4 method for signature 'bard.sampler.class'
plot(x, subset, variate_names, tile_plot, marginals = FALSE)

## S4 method for signature 'capa.class'
plot(x, subset, variate_names = FALSE, tile_plot, epoch = nrow(x@data))

## S4 method for signature 'pass.class'
plot(x, subset, variate_names = FALSE, tile_plot)



An instance of an S4 class produced by capa, pass, or sampler.


A numeric vector specifying a subset of the variates to be displayed. Default value is all of the variates present in the data.


Logical value indicating if variate names should be displayed on the plot. This is useful when a large number of variates are being displayed as it makes the visualisation easier to interpret. Default value is FALSE.


Logical value. If TRUE then a tile plot of the data is produced. The data displayed in the tile plot is normalised to values in [0,1] for each variate. This type of plot is useful when the data contains are large number of variates. The default value is TRUE if the number of variates is greater than 20.


Logical value. If marginals=TRUE the plot will include visualisations of the marginal probablities of each time point being anomalous. The defualt is marginals=FALSE.


Positive integer. CAPA methods are sequential and as such, can generate results up to, and including, any epoch within the data series. This can be controlled by the value of epoch and is useful for examining how the inferred anomalies are modified as the data series grows. The default value for epoch is the length of the data series.


A ggplot object.

See Also


anomaly documentation built on Nov. 23, 2023, 5:07 p.m.