datePretty | R Documentation |
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.
datePretty(x, major = "Auto", minor = "Auto", tick.span = 1, style = c("Auto", "at", "between"), label.abbr = 0)
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 | |||||||||
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 | |||||||||
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
|
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.
Formatting information about the axis labels.
timePlot
, month.USGS
, timePretty
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.