grid (version 3.3)

grid.xaxis: Draw an X-Axis

Description

These functions create and draw an x-axis.

Usage

grid.xaxis(at = NULL, label = TRUE, main = TRUE,
           edits = NULL, name = NULL,
           gp = gpar(), draw = TRUE, vp = NULL)

xaxisGrob(at = NULL, label = TRUE, main = TRUE, edits = NULL, name = NULL, gp = gpar(), vp = NULL)

Arguments

at
A numeric vector of x-value locations for the tick marks.
label
A logical value indicating whether to draw the labels on the tick marks, or an expression or character vector which specify the labels to use. If not logical, must be the same length as the at argument.
main
A logical value indicating whether to draw the axis at the bottom (TRUE) or at the top (FALSE) of the viewport.
edits
A gEdit or gEditList containing edit operations to apply (to the children of the axis) when the axis is first created and during redrawing whenever at is NULL.
name
A character identifier.
gp
An object of class gpar, typically the output from a call to the function gpar. This is basically a list of graphical parameter settings.
draw
A logical value indicating whether graphics output should be produced.
vp
A Grid viewport obect (or NULL).

Value

  • An xaxis grob. grid.xaxis returns the value invisibly.

Details

Both functions create an xaxis grob (a graphical object describing an xaxis), but only grid.xaxis draws the xaxis (and then only if draw is TRUE).

See Also

Grid, viewport, grid.yaxis