Skip to contents

Allows options for iterative plotting sonde project data for different variables, used within modules to simplify code for plotting.

Usage

plot_sonde(
  data,
  y_var,
  y2_var = NULL,
  proj = NULL,
  opts = list(points = TRUE, line = TRUE, files = FALSE, oow = FALSE, calcheck = FALSE,
    qualflag = FALSE),
  source = "plot"
)

Arguments

data

A `data.frame` with the sonde data to plot.

y_var

Y-variable to plot on the y-axis.

y2_var

A second, optional y-variable to plot on a second axis.

proj

A `sondeproj` object with additional metadata to plot, only required if opts includes oow, calcheck, quality_flag or `y2_var` is "precip" or "raw".

opts

A list of options for plotting: - points: should points be plotted? - line: should line be plotted? -files: should points be colored by file? -oow: should out of water periods be plotted? -calcheck: should cal check be plotted? -quality_flag: should questionable points be plotted?

source

A character specifying the plot name for shiny reactivity.

Value

a `plotly` object

Examples

plot_sonde(example_data, y_var = "Temp_C")
plot_sonde(example_data, y_var = "Temp_C", y2_var = "ODO_mg_L") #adding a second axis
plot_sonde(example_data, proj = example_sondeproj, y_var ="Temp_C", y2_var = "precip")