baytrends (version 1.1.0)

datePretty: Pretty Axis

Description

Constructs information for making a nicely formatted date axis. A support function for creating date/time axes. Understanding the arguments can help in building specially formatted axes.

Usage

datePretty(x, major = "Auto", minor = "Auto", tick.span = 1,
  style = c("Auto", "at", "between"), label.abbr = 0)

Arguments

x

date and time data

major

the major tick interval, must be one of "hours," "days," "months," "years," "water years," or "Auto," which will make an intelligent choice from those. "Auto" will also automatically change tick.span. Abbreviations are permitted. See Details.

minor

the minor tick interval, must be one of "min," "hours," "days," "months," "years," or "Auto," which will make an intelligent choice from those, possibly adjusted by a scaling factor. Can also be formatted as an argument to seq, such as "15 mins" for 15-minute ticks. Abbreviations are not permitted to account for the scaling factor.

tick.span

span between major labels. For example, with "years" option, tick.span=5 would generate labels like 1990, 1995, 2000 and so forth.

style

the style of labels, must be one of "at," "between," or "Auto," which selects the "best" style. "At" places the labels at the ticks and "between" places the labels between the major ticks. Abbreviations are permitted.

label.abbr

indicator of the degree of abbreviation for labels

0 best guess based on number of intervals
1 shortest (single letter month, for example)
2 USGS abbreviation (3- or 4-letter month name, for example)
3 full text

Value

Formatting information about the axis labels.

Details

Setting major to "water year" is practical only for periods of time from 1 to 5 water years in length; also sets the date range to water years.

Added from smwrGraphs.