1% File src/library/grid/man/grid.xaxis.Rd 2% Part of the R package, https://www.R-project.org 3% Copyright 1995-2020 R Core Team 4% Distributed under GPL 2 or later 5 6\name{grid.xaxis} 7\alias{grid.xaxis} 8\alias{xaxisGrob} 9\title{Draw an X-Axis} 10\description{ 11 These functions create and draw an x-axis. 12} 13\usage{ 14grid.xaxis(at = NULL, label = TRUE, main = TRUE, 15 edits = NULL, name = NULL, 16 gp = gpar(), draw = TRUE, vp = NULL) 17 18xaxisGrob(at = NULL, label = TRUE, main = TRUE, 19 edits = NULL, name = NULL, 20 gp = gpar(), vp = NULL) 21} 22\arguments{ 23 \item{at}{A numeric vector of x-value locations for the tick marks.} 24 \item{label}{A logical value indicating whether to draw the labels 25 on the tick marks, or an expression or character vector which 26 specify the labels to use. If not logical, must be the same 27 length as the \code{at} argument.} 28 \item{main}{A logical value indicating whether to draw the axis 29 at the bottom (\code{TRUE}) or at the top (\code{FALSE}) of the 30 viewport.} 31 \item{edits}{A gEdit or gEditList containing edit operations 32 to apply (to the children of the axis) 33 when the axis is first created and during redrawing 34 whenever \code{at} is \code{NULL}. 35 } 36 \item{name}{ A character identifier. } 37 \item{gp}{An object of class \code{"gpar"}, typically the output 38 from a call to the function \code{\link{gpar}}. This is basically 39 a list of graphical parameter settings.} 40 \item{draw}{A logical value indicating whether graphics output 41 should be produced.} 42 \item{vp}{A Grid viewport object (or \code{NULL}).} 43} 44\details{ 45 Both functions create an xaxis grob (a graphical object describing an 46 xaxis), but only \code{grid.xaxis} 47 draws the xaxis (and then only if \code{draw} is \code{TRUE}). 48} 49\value{ 50 An xaxis grob. \code{grid.xaxis} returns the value invisibly. 51} 52\section{Children}{ 53 If the \code{at} slot of an xaxis grob is not \code{NULL} then 54 the xaxis will have the following children: 55 \describe{ 56 \item{major}{ representing the line at the base of the 57 tick marks.} 58 \item{ticks}{representing the tick marks.} 59 \item{labels}{representing the tick labels.} 60 } 61 62 If the \code{at} slot is \code{NULL} then there are no children 63 and ticks are drawn based on the current viewport scale. 64} 65\author{Paul Murrell} 66\seealso{ 67 \link{Grid}, 68 \code{\link{viewport}}, 69 \code{\link{grid.yaxis}} 70} 71\keyword{dplot} 72