Low-level Axis Plotting Function

DESCRIPTION:

Render an axis for a plot, with flexible ticks, labels, and axis breaks.

USAGE:

axis.render(side, ticks, labels, breaks, line=list(), scale=NULL,  
            adj=par("adj"), cex=par("cex"), col=par("col"),  
            font=par("font"), lty=par("lty"), lwd=par("lwd"),  
            srt=par("srt"), min.gap=1) 

REQUIRED ARGUMENTS:

side
the side of the plot: 1 for bottom, 2 for left, 3 for top, and 4 for right.

OPTIONAL ARGUMENTS:

ticks
list specifying tick placement (see below).
labels
list specifying axis labels (see below).
breaks
list specifying axis breaks (see below).
line
list specifiying axis line (see below).
scale
the scale to use for the coordinates parallel to side. Can be NULL if the at elements of ticks, labels, and breaks are in what plot considers to be the user coordinates for the plot. If the at elements are given as calendar times or in user coordinates which are piecewise-linear transformations of plot coordinates, then scale is a 2-element list where the first element is a monotonic sequence in user-coordinates giving the endpoints of the linear regions, and the second element is the plot coordinates of those points. Coordinates which lie outside the scale region will be moved to the ends and a warning will generated.
adj
string justification, as in par; overridden by list elements.
cex
character expansion, as in par; overridden by list elements.
col
color of lines, as in par; overridden by list elements.
font
text font, as in par; overridden by list elements.
lty
line type of lines, as in par; overridden by list elements.
lwd
width of lines, as in par; overridden by list elements.
srt
string rotation, as in par; overridden by list elements.
min.gap
minumum gap reqired between axis labels, in characters.

VALUE:

a list of the arguments (invisibly).

SIDE EFFECTS:

Draws an axis line and the specified breaks, ticks, and labels on the current plot, in that order.

DETAILS:

This function is meant to be called by higher-level plotting routines, which calculate the positions and other desired parameters. The ticks argument is a list, or list of lists, where each list has the following elements. Note that if it is a named list of lists, default plotting parameters for each list will come from trellis.par.get(name) if not supplied in that list element; the default list element name is "small.tick" if the list is not named, which means that trellis.par.get("small.tick") supplies the defaults.

SEE ALSO:

.

EXAMPLES:

xtck <- 1:10 
ytck <- 5 * xtck 
plot(xtck, ytck, axes = F) 
# ticks and labels for x axis 
axis.render(1, ticks = list(at = xtck),  
             labels = list(at = xtck, text = xtck)) 
# ticks and labels for y axis 
axis.render(2, ticks = list(at = ytck),  
             labels = list(at = ytck, text = ytck, srt = 90)) 
# ticks for top axis 
axis.render(3, ticks = list(at = xtck)) 
# ticks for right axis 
axis.render(4, ticks = list(at = ytck))