Skip to contents

[Experimental]

Usage

# S3 method for class 'SGD_ESTIMATION_DF'
plot(
  x,
  y,
  vars = c("hf", "q0", "Wnet"),
  base_date,
  type = c("pred", "comp", "input"),
  obs_x = "date",
  obs_y = "hf",
  xbreaks = 10,
  ybreaks = 5,
  maxRange = 600,
  coeff = 0.3,
  names = c("hf", "q0", "hn", "xn", "Wnet", "_Wnet"),
  colors = c(obs = "red", precp = "blue", q1 = "green", est = "blue"),
  color_labels = c(obs = "Observed GWL", precp = "Precipitation", q1 = "q1", est =
    "Estimated GWL"),
  labels = c("GWL~(m~AHD)", "q[0]~(m^3/d)", "h[n]~(m~AHD)", "x[n]~(m)", "W[net]~(mm)",
    "bar(W[net])~(mm)"),
  .plot = FALSE,
  ...
)

Arguments

x

An object of class sgdEstimation. Created by estimate_sgd.

y

A data.frame of daily observed groundwater level data. See Details.

vars

A character vector of the variables to plot. Can be 'all' or a subset of 'hf', 'q0', 'hn', 'xn', 'Wnet', '_Wnet'.

base_date

A valid string that can be transformed into data format using ymd.

type

A character string indicating the type of plot. Can be one of 'pred', 'comp', 'input'.

obs_x

A character string indicating the column name of the date in the observed data.

obs_y

A character string indicating the column name of the groundwater level in the observed data.

xbreaks

An integer indicating the number of breaks on the x-axis.

ybreaks

An integer indicating the number of breaks on the y-axis.

maxRange

A numeric indicating the maximum range of the first axis (groundwater level).

coeff

A numeric indicating the shrink coefficient of the precipitation.

names

A character vector of the variable names to plot.

colors

A named character vector of the colors to use

color_labels

A named character vector of the labels for the colors.

labels

A character vector of the variable labels to plot.

.plot

A logical indicating whether to return the plot as a ggplot object.

...

Additional arguments passed to the plot function. (currently not implemented)

Value

Invisibly returns the original estimated results.