baytrends (version 1.1.0)

linearPretty: Pretty Axis

Description

Constructs information for making a nicely formatted linear numeric axis. A support function for creating linear axes.

Usage

linearPretty(x, hard = FALSE, labels = "Auto", style = "Auto",
  extend.pct = 0, extend.range = TRUE)

Arguments

x

data defining the range to be plotted on the axis. Missing values are permitted, but ignored.

hard

logical, if TRUE, then use the minimum and maximum of x as the fixed range of the axis, otherwise find "nice" limits.

labels

either "Auto," which lets the function decide how many labels, the approximate number of labels, or the actual labels to use. If the actual labels are numeric, then the will be formatted using style. If they are character, then they must be able to be converted to numeric values (commas are removed before conversion).

style

a character string indicating the style of the axis labels if they are not specifically listed in labels. Valid values are "numeric," which forces the labels to be displayed as numbers; "scientific," which forces the labels displayed using scientific notation; or "Auto" (the default), which disaplays labels as numbers but switches to scientific notation for large ranges. Only the first letter is required. Any invalid value will produce simply formatted labels.

extend.pct

extend the axis range by extend.pct. Only valid when hard is FALSE.

extend.range

if TRUE, then extend the data range by a bit to avoid plotting on axis. Otherwise do not extend the data range. Only valid when hard is FALSE; Ignored in logPretty

Value

Information about the axis labels.

Details

Added from smwrGraphs.