DelwaqEcoplot: plot time series variable with limiting factors

Description Usage Arguments Value Examples

Description

plot time series variable with limiting factors

Usage

1
DelwaqEcoplot(arr, locmod, submod, limmod, plottype)

Arguments

arr

array with model results produced with his2arr

locmod

one or more locations

submod

one or more variables

limmod

limiting factors to plot

plottype

1-solid lines of varying thickness; 2- thick lines of varying transparancy

Value

A timeseries plot with variable and limiting factors

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
library(DelwaqR)
arr <- his2arr(filename = "extdata/NZBLOOM.his", timestamp = F, begintime = "2003-01-01 00:00:00")
dimnames(arr)
submod <- c("Chlfa", "OXY")
locmod <- c("NZR6NW020", "NZR9TS010")
df <- arr2df(arr, locmod=locmod, submod=submod)
df$value[df$variable == "fResptot"] <- -df$value[df$variable == "fResptot"]
library(ggplot2)
plot <- ggplot(df, aes(time, value))
plot +
  geom_line(aes(color = variable), size = 1) +
  geom_point(aes(color = variable), fill = "white",  shape = 21, size = 4) +
  facet_grid((. ~ location))
limmod = c("Limit e", "Limit nit", "Limit pho", "Limit sil")
DelwaqEcoplot(arr = arr, locmod = locmod, submod = submod, limmod = limmod, plottype = 1)
DelwaqEcoplot2(arr = arr, locmod = locmod, submod = submod, limmod = limmod, plottype = 1)

wstolte/DelwaqR documentation built on June 20, 2021, 12:03 p.m.