generalAxis: Axis generation for log discharge

View source: R/generalAxis.R

generalAxisR Documentation

Axis generation for log discharge

Description

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)
min <- min(x)
generalAxis(x, max, min, units, log=TRUE)
generalAxis(Daily$ConcDay, 100, 0, concLab = "concentration")

USGS-R/EGRET documentation built on Nov. 20, 2024, 7:45 p.m.