Axis for Numeric Data

DESCRIPTION:

Function to compute the parameters needed to render an axis for numeric data.

USAGE:

axis.numeric(y, ylim=NULL, style="r", n.ticks=c(40, 8),  
             tick.levels=c("small","medium"), label.level="medium",  
             las=0, side=2, digits=4, reference.grids=T, log.axis=F, 
             pi.divide=F, at=NULL, labels=NULL) 

REQUIRED ARGUMENTS:

y
a numeric vector of data values to be plotted.

OPTIONAL ARGUMENTS:

ylim
a numeric vector of length 2 specifying the minimum and maximum value to be plotted.
style
a character indicating the style of axis, as in the par command. Possible values are "r", "i", "e", or "s".
n.ticks
a numeric vector indicating the approximate desired tick marks at each of the tick.levels.
tick.levels
a vector of character strings indicating which tick marks are to be displayed. Up to three types of tick marks are supported: "small", "medium", and "big".
label.level
a character string (length 1) indicating at which type of tick mark the tick labels are to be displayed. The possible choices are the elements of tick.levels.
las
a number indicating the orientation of the labels with respect to the axis: las=0 corresponds to always parallel to the axis, las=1 corresponds to always horizontal, and las=2 corresponds to always perpendicular to the axis.
side
an integer specifying the side on which the axis is to be placed: 1 for bottom, 2 for left, 3 for top or 4 for right.
digits
the number of digits in the formatted label.
reference.grids
if TRUE, reference grids are generated.
log.axis
if TRUE, make a logarithmic axis, making the tick, label, and grid placements in log coordinates, and the spacing "pretty" in log space.
pi.divide
if TRUE, make axis labels be e.g. "2 pi" instead of 6.28, and place them at "pretty" pi values.
at
if not NULL, put ticks and labels for the tick level given by level.label at these values, instead of calculating "pretty" values. Note that this does not override ylim, so your ticks are not guaranteed to fall inside the plot.
labels
if not NULL, and at != NULL as well, this character vector is used for the labels instead of formatting the tick positions.

VALUE:

a list with components
ticks
information for rendering the tick marks.
labels
information for rendering the tick labels.
grid
information for rendering the reference grid lines.
line
information for rendering the axis line (empty).

SEE ALSO:

.