obsplot: Plot observed response variable and salinity/flow data

View source: R/obsplot.R

obsplotR Documentation

Plot observed response variable and salinity/flow data

Description

Plot observed response variable and salinity/flow time series from a tidal object

Usage

obsplot(dat_in, ...)

## Default S3 method:
obsplot(
  dat_in,
  lines = TRUE,
  logspace = TRUE,
  dt_rng = NULL,
  pretty = TRUE,
  col = "black",
  lwd = 1,
  size = 2,
  alpha = 1,
  ...
)

## S3 method for class 'tidal'
obsplot(dat_in, ...)

## S3 method for class 'tidalmean'
obsplot(dat_in, ...)

Arguments

dat_in

input tidal or tidalmean object

...

arguments passed to geom_line

lines

logical indicating if a line plot is used, otherwise points

logspace

logical indicating if plots are in log space

dt_rng

Optional chr string indicating the date range of the plot. Must be two values in the format 'YYYY-mm-dd' which is passed to as.Date.

pretty

logical indicating if my subjective idea of plot aesthetics is applied, otherwise the ggplot default themes are used

col

chr string of plot color to use

lwd

numeric value indicating width of lines

size

numeric value indicating size of points

alpha

numeric value indicating transparency of points or lines

Value

A ggplot object that can be further modified

See Also

fitplot

Examples


## load a fitted tidal object
data(tidfit)

## plot using defaults
obsplot(tidfit)
 
## changing default
obsplot(tidfit, alpha = 0.5, size = 4, col = 'blue', lines = FALSE)

## plot a tidalmean object
data(tidfitmean)

obsplot(tidfitmean)

fawda123/WRTDStidal documentation built on Oct. 22, 2023, 11:28 p.m.