namePretty: Pretty Axis

View source: R/namePretty.R

namePrettyR Documentation

Pretty Axis

Description

Constructs information for making a nicely formatted axis for discrete data. A support function for creating discrete axes.

Usage

namePretty(x, orientation = "table", order = "none",
  label.abbr = FALSE, offset = 0.5, style = "at")

Arguments

x

the discrete data values.

orientation

the orientation of the data in x.

"table" first in sequence at top (ends on right if x-axis)
"grid" first in sequence at bottom
order

the order of the data in x.

"none" accept order as is
"ascending" sort in ascending alphabetical order
"descending" sort in descending alphabetical order
named numeric vector sort by values (largest value at top if orientation is "table")
character vector specifies the sequence of names
label.abbr

logical, if TRUE, then create abbreviations for x, otherwise use the full text of x for labels.

offset

amount to offset the range, generally 0.5 or 1. The range of the data is from 1 to the number of elements in x.

style

character string indicating the placement of the ticks. If "at" (default), then place ticks at the labels. If "between," then place ticks between the labels.

Value

Information about the axis labels

See Also

dotPlot


USGS-R/smwrGraphs documentation built on Oct. 11, 2022, 6:11 a.m.