panel.axis
is the function used by lattice to draw axes. It's
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. current.panel.limits
can be used to
retrieve a panel's x and y limits.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 = 1,
rot, ...)
current.panel.limits()
current.panel.limits
returns a list with components xlim
and ylim
, which are both numeric vectors of length 2, giving
the (native) scales of the current panel (viewport).tck = as.numeric(ticks), rot = if (is.logical(labels)) 0 else c(90, 0),
text.col = axis.text$col, text.alpha = axis.text$alpha, text.cex = axis.text$cex, text.font = axis.text$font, text.fontfamily = axis.text$fontfamily, text.fontface = axis.text$fontface,
line.col = axis.line$col, line.lty = axis.line$lty, line.lwd = axis.line$lwd, line.alpha = axis.line$alpha)
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 panel.pairs
for splom
, as
well as for all the usual axis drawing by the print method for
``trellis'' objects. It can also be used to enhance plots `after the
fact' by adding axes.Lattice
, xyplot
,
trellis.focus