plotHydroConc: plotHydroConc

View source: R/plotHydroConc.R

plotHydroConcR Documentation

plotHydroConc

Description

Function to generate a two panel graph with hydrograph(s) in the top panel and concentration or other water quality parameter (e.g. flux) in the lower panel with corresponding date axes for the top and bottom panels

Usage

plotHydroConc(
  Q,
  QVars,
  QDateVars,
  smooth,
  sites,
  Conc,
  CVars,
  CDateVar,
  CVarsDisplay,
  dates,
  sampDates,
  eventDates,
  Qcols,
  Ccols,
  leftBuffer,
  rightBuffer,
  concLines = TRUE,
  Qylab = "Discharge (cfs)",
  Cylab = "Concentration",
  title1 = "Flow",
  title2 = "and concentration"
)

Arguments

Q

dataframe list with flow variables and POSIXct date variables. The list contains one file per Q record (usually one dataframe per site).

QVars

vector of strings that signify the column names that represent the flow variables in the dataframes defined in Q

QDateVars

vector of strings that signify the column names that represent the POSIXct date variables in the dataframes defined in Q

smooth

Boolean vector to trigger lowess smooth in graphing rather than direct flow graphing (useful for sites impacted by seiche)

sites

Sites for Q data. This will be used in the legend of the Q panel

Conc

dataframe with variables to be plotted in the second panel

CVars

vector of strings that represent the variables in Conc to include in the graphs in the second panel

CDateVar

column name in Conc for sample dates and times in POSIXct

CVarsDisplay

variable names from CVars to be displayed on the legend

dates

dataframe with beginning and ending sample dates and times and beginning and ending hydrograph dates and times

sampDates

vector of length two that contains strings representing the column names for beginning and ending dates and times for samples

eventDates

vector of length two that contains strings representing the column names for beginning and ending dates and times for the sampling event. This is the hydrograph segment that the samples are intended to represent (often a runoff hydrograph or a baseflow period)

Qcols

vector of colors for ploting hydrographs from the Q dataframe

Ccols

vector of colors for plotting from the Conc dataframe

leftBuffer

time in days to plot before the beginning of the event period

rightBuffer

time in days to plot after the end of the event period

concLines

Boolean variable to signify whether a line should be drawn between consecutive data points from the Conc dataframe in the second graph panel

Qylab

y-axis label for the first graph panel

Cylab

y-axis label for the second graph panel

title1

Line 1 of plot title

title2

Line 2 of plot title

Examples

#Add example


USGS-R/USGSHydroTools documentation built on April 17, 2023, 8:09 p.m.