Skip to contents

Create ggplot for one current qc_test and variable

Usage

adcp_ggplot_flags(
  dat,
  qc_test,
  n_col = NULL,
  flag_title = TRUE,
  plotly_friendly = FALSE
)

Arguments

dat

Data frame of flagged current data in long format. Must include a column named with the string "_flag_value".

qc_test

qc test to plot.

n_col

Number of columns for faceted plots.

flag_title

Logical argument indicating whether to include a ggtitle of the qc test and variable plotted.

plotly_friendly

Logical argument. If TRUE, the legend will be plotted when plotly::ggplotly is called on p. Default is FALSE, which makes the legend look better in a static figure.

Value

Returns a ggplot object; a figure for qc_test. Points are coloured by the flag value and panels are faceted by depth and sensor.