Skip to contents

Discharge axis tick generation

Usage

generalAxis(x, maxVal, minVal, units = NA, logScale = FALSE,
  tinyPlot = FALSE, padPercent = 5, concentration = TRUE, concLab = 1,
  usgsStyle = FALSE, prettyDate = TRUE)

Arguments

x

vector to create scale about

maxVal

number maximum value on returned scale

minVal

number minimum value on returned scale

units

character concentration units. Typically found in INFO$param.units.

logScale

logical whether or not to return a log scale

tinyPlot

logical

padPercent

number used to pad the max and min if not specified

concentration

logical if concentration=TRUE, labels returned as concentration units, otherwise flux units.

concLab

object of concUnit class, or numeric represented the short code, or character representing the descriptive name. By default, this argument sets concentration labels to use either Concentration or Conc (for tiny plots). Units are taken from the eList$INFO$param.units. To use any other words than "Concentration" see vignette(topic = "units", package = "EGRET").

usgsStyle

logical option to use USGS style guidelines. Setting this option to TRUE does NOT guarantee USGS compliance. It will only change automatically generated labels

prettyDate

logical use 'pretty' limits for date axis if TRUE, or force the yearStart/yearEnd as limits if FALSE

Examples

eList <- Choptank_eList
Daily <- getDaily(eList)
INFO <- getInfo(eList)
x <- Daily$Q
max <- max(x)
min <- 0
units <- INFO$param.units
generalAxis(x, max, min, units)
#> $ticks
#> [1]   0  50 100 150 200 250
#> 
#> $bottom
#> [1] 0
#> 
#> $top
#> [1] 250
#> 
#> $label
#> [1] "Concentration in mg/l as N"
#> 
min <- min(x)
generalAxis(x, max, min, units, log=TRUE)
#> $ticks
#>  [1] 5e-03 1e-02 2e-02 5e-02 1e-01 2e-01 5e-01 1e+00 2e+00 5e+00 1e+01 2e+01
#> [13] 5e+01 1e+02 2e+02 5e+02
#> 
#> $bottom
#> [1] 0.005
#> 
#> $top
#> [1] 500
#> 
#> $label
#> [1] "Concentration in mg/l as N"
#> 
generalAxis(Daily$ConcDay, 100, 0, concLab = "concentration")
#> $ticks
#>  [1]   0  10  20  30  40  50  60  70  80  90 100
#> 
#> $bottom
#> [1] 0
#> 
#> $top
#> [1] 100
#> 
#> $label
#> [1] "Concentration in NA"
#>