\HeaderA{panel.axis}{Panel Function for Drawing Axis Ticks and Labels}{panel.axis}
\aliasA{current.panel.limits}{panel.axis}{current.panel.limits}
\keyword{dplot}{panel.axis}
\begin{Description}\relax
\code{panel.axis} is the function used by lattice to draw axes. It is
typically not used by users, except those wishing to create advanced
annotation. Keep in mind issues of clipping when trying to use it as
part of the panel function. \code{current.panel.limits} can be used to
retrieve a panel's x and y limits.
\end{Description}
\begin{Usage}
\begin{verbatim}
panel.axis(side = c("bottom", "left", "top", "right"),
           at,
           labels = TRUE,
           draw.labels = TRUE,
           check.overlap = FALSE,
           outside = FALSE,
           ticks = TRUE,
           half = !outside,
           which.half,
           tck = as.numeric(ticks),
           rot = if (is.logical(labels)) 0 else c(90, 0),
           text.col, text.alpha, text.cex, text.font,
           text.fontfamily, text.fontface,
           line.col, line.lty, line.lwd, line.alpha)

current.panel.limits(unit = "native")
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{side}] character string indicating which side axes are to be drawn
on. Partial specification is allowed.

\item[\code{at}] location of labels 
\item[\code{labels}] the labels to go along with \code{at}. The labels can be a character
vector or a vector of expressions. Alternatively, this can be a
logical. If TRUE, the labels are derived from \code{at}, otherwise,
labels are empty.

\item[\code{draw.labels}] logical indicating whether labels are to be drawn

\item[\code{check.overlap}] logical, whether to check for overlapping of labels.  This also has
the effect of removing \code{at} values that are \sQuote{too close}
to the limits.

\item[\code{outside}] logical, whether to the labels draw outside the panel or inside.
Note that \code{outside=TRUE} will only have a visible effect if
clipping is disabled for the viewport (panel).

\item[\code{ticks}] logical, whether to draw the tickmarks 
\item[\code{half}] logical, whether only half of scales will be drawn for each side

\item[\code{which.half}] character string, one of \code{"lower"} and
\code{"upper"}. Indicates which half is to be used for tick
locations if \code{half=TRUE}.  Defaults to whatever is suitable for
\code{\LinkA{splom}{splom}}

\item[\code{tck}] numeric scalar, multiplier for tick length. Can be negative.

\item[\code{rot}] rotation angles for labels in degrees. Can be a vector of length 2
for x- and y-axes respectively

\item[\code{text.col, text.alpha, text.cex, text.font, text.fontfamily,
text.fontface, line.col, line.lty, line.lwd, line.alpha}] graphical
parameters 
\item[\code{unit}] which grid \code{\LinkA{unit}{unit}} the values
should be in 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{panel.axis} can draw axis tick marks inside or outside a
panel (more precisely, a grid viewport). It honours the (native) axis
scales. Used in \code{\LinkA{panel.pairs}{panel.pairs}} for \code{\LinkA{splom}{splom}}, as
well as for all the usual axis drawing by the print method for
\code{"trellis"} objects. It can also be used to enhance plots
\sQuote{after the fact} by adding axes.
\end{Details}
\begin{Value}
\code{current.panel.limits} returns a list with components \code{xlim}
and \code{ylim}, which are both numeric vectors of length 2, giving
the scales of the current panel (viewport).  The values correspond to
the unit system specified by \code{\LinkA{unit}{unit}}, by default
\code{"native"}.
\end{Value}
\begin{Author}\relax
Deepayan Sarkar \email{Deepayan.Sarkar@R-project.org}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{Lattice}{Lattice}}, \code{\LinkA{xyplot}{xyplot}},
\code{\LinkA{trellis.focus}{trellis.focus}}, \code{\LinkA{unit}{unit}}
\end{SeeAlso}

