Visualize the anomalies in one or multiple time series

plot_anomalies(data, time_recomposed = FALSE, ncol = 1,
color_no = "#2c3e50", color_yes = "#e31a1c", fill_ribbon = "grey70",
alpha_dots = 1, alpha_circles = 1, alpha_ribbon = 1, size_dots = 1.5,
size_circles = 4)

## Arguments

data A tibble or tbl_time object. A boolean. If TRUE, will use the time_recompose() bands to place bands as approximate limits around the "normal" data. Number of columns to display. Set to 1 for single column by default. Color for non-anomalous data. Color for anomalous data. Fill color for the time_recomposed ribbon. Controls the transparency of the dots. Reduce when too many dots on the screen. Controls the transparency of the circles that identify anomalies. Controls the transparency of the time_recomposed ribbon. Controls the size of the dots. Controls the size of the circles that identify anomalies.

## Value

Returns a ggplot object.

## Details

Plotting function for visualizing anomalies on one or more time series. Multiple time series must be grouped using dplyr::group_by().

plot_anomaly_decomposition()

## Examples


library(dplyr)
library(ggplot2)

#### SINGLE TIME SERIES ####
filter(package == "tidyquant") %>%
ungroup() %>%
time_decompose(count, method = "stl") %>%
anomalize(remainder, method = "iqr") %>%
time_recompose() %>%
plot_anomalies(time_recomposed = TRUE)#> frequency = 7 days#> trend = 91 days

#### MULTIPLE TIME SERIES ####