1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gtable-layouts.R
\name{gtable_row}
\alias{gtable_row}
\title{Create a single row gtable.}
\usage{
gtable_row(
name,
grobs,
height = NULL,
widths = NULL,
z = NULL,
vp = NULL,
clip = "inherit"
)
}
\arguments{
\item{name}{a string giving the name of the table. This is used to name
the layout viewport}
\item{grobs}{a single grob or a list of grobs}
\item{height}{a unit vector giving the height of this row}
\item{widths}{a unit vector giving the width of each column}
\item{z}{a numeric vector giving the order in which the grobs should be
plotted. Use \code{Inf} (the default) to plot above or \code{-Inf}
below all existing grobs. By default positions are on the integers,
giving plenty of room to insert new grobs between existing grobs.}
\item{vp}{a grid viewport object (or NULL).}
\item{clip}{should drawing be clipped to the specified cells
(\code{"on"}), the entire table (\code{"inherit"}), or not at all
(\code{"off"})}
}
\value{
A gtable with a single row and the same number of columns as
elements in the grobs list
}
\description{
This function puts grobs in a list side-by-side in a single-row gtable from
left to right witrh the given widths and height.
}
\examples{
library(grid)
a <- rectGrob(gp = gpar(fill = "red"))
b <- circleGrob()
c <- linesGrob()
gt <- gtable_row("demo", list(a, b, c))
gt
plot(gt)
gtable_show_layout(gt)
}
\seealso{
Other gtable construction:
\code{\link{gtable}()},
\code{\link{gtable_col}()},
\code{\link{gtable_matrix}()},
\code{\link{gtable_spacer}}
}
\concept{gtable construction}
|