| Line 9... |
Line 9... |
| 9 |
\alias{pathListing}
|
9 |
\alias{pathListing}
|
| 10 |
\alias{grobPathListing}
|
10 |
\alias{grobPathListing}
|
| 11 |
\title{ List the names of grobs or viewports }
|
11 |
\title{ List the names of grobs or viewports }
|
| 12 |
\description{
|
12 |
\description{
|
| 13 |
Returns a listing of the names of grobs or viewports.
|
13 |
Returns a listing of the names of grobs or viewports.
|
| 14 |
|
14 |
|
| 15 |
This is a generic function with methods for grobs (including
|
15 |
This is a generic function with methods for grobs (including
|
| 16 |
gTrees) and viewports (including vpTrees).
|
16 |
gTrees) and viewports (including vpTrees).
|
| 17 |
}
|
17 |
}
|
| 18 |
\usage{
|
18 |
\usage{
|
| 19 |
grid.ls(x=NULL, grobs=TRUE, viewports=FALSE, fullNames=FALSE,
|
19 |
grid.ls(x=NULL, grobs=TRUE, viewports=FALSE, fullNames=FALSE,
|
| 20 |
recursive=TRUE, print=TRUE, flatten=TRUE, ...)
|
20 |
recursive=TRUE, print=TRUE, flatten=TRUE, ...)
|
| 21 |
|
21 |
|
| 22 |
nestedListing(x, gindent=" ", vpindent=gindent)
|
22 |
nestedListing(x, gindent=" ", vpindent=gindent)
|
| 23 |
pathListing(x, gvpSep=" | ", gAlign=TRUE)
|
23 |
pathListing(x, gvpSep=" | ", gAlign=TRUE)
|
| 24 |
grobPathListing(x, ...)
|
24 |
grobPathListing(x, ...)
|
| 25 |
}
|
25 |
}
|
| 26 |
\arguments{
|
26 |
\arguments{
|
| 27 |
\item{x}{A grob or viewport or \code{NULL}. If \code{NULL}, the current
|
27 |
\item{x}{A grob or viewport or \code{NULL}. If \code{NULL}, the current
|
| 28 |
grid display list is listed.
|
28 |
grid display list is listed.
|
| 29 |
|
29 |
|
| Line 56... |
Line 56... |
| 56 |
of the grid display list are listed (both viewports and grobs).
|
56 |
of the grid display list are listed (both viewports and grobs).
|
| 57 |
In other words, all objects representing the current scene
|
57 |
In other words, all objects representing the current scene
|
| 58 |
are listed.
|
58 |
are listed.
|
| 59 |
|
59 |
|
| 60 |
Otherwise, \code{x} should be a grob or a viewport.
|
60 |
Otherwise, \code{x} should be a grob or a viewport.
|
| 61 |
|
61 |
|
| 62 |
The default behaviour of this function is to print information
|
62 |
The default behaviour of this function is to print information
|
| 63 |
about the grobs in the current scene. It is also possible to
|
63 |
about the grobs in the current scene. It is also possible to
|
| 64 |
add information about the viewports in the scene. By default,
|
64 |
add information about the viewports in the scene. By default,
|
| 65 |
the listing is recursive, so all children of gTrees and all
|
65 |
the listing is recursive, so all children of gTrees and all
|
| 66 |
nested viewports are reported.
|
66 |
nested viewports are reported.
|
| Line 110... |
Line 110... |
| 110 |
grid.ls(sampleGTree, view=TRUE, print=nestedListing, gindent="--")
|
110 |
grid.ls(sampleGTree, view=TRUE, print=nestedListing, gindent="--")
|
| 111 |
# path listing
|
111 |
# path listing
|
| 112 |
grid.ls(sampleGTree, view=TRUE, print=pathListing)
|
112 |
grid.ls(sampleGTree, view=TRUE, print=pathListing)
|
| 113 |
# path listing, without grobs aligned
|
113 |
# path listing, without grobs aligned
|
| 114 |
grid.ls(sampleGTree, view=TRUE, print=pathListing, gAlign=FALSE)
|
114 |
grid.ls(sampleGTree, view=TRUE, print=pathListing, gAlign=FALSE)
|
| 115 |
# grob path listing
|
115 |
# grob path listing
|
| 116 |
grid.ls(sampleGTree, view=TRUE, print=grobPathListing)
|
116 |
grid.ls(sampleGTree, view=TRUE, print=grobPathListing)
|
| 117 |
# path listing, grobs only
|
117 |
# path listing, grobs only
|
| 118 |
grid.ls(sampleGTree, print=pathListing)
|
118 |
grid.ls(sampleGTree, print=pathListing)
|
| 119 |
# path listing, viewports only
|
119 |
# path listing, viewports only
|
| 120 |
grid.ls(sampleGTree, view=TRUE, grob=FALSE, print=pathListing)
|
120 |
grid.ls(sampleGTree, view=TRUE, grob=FALSE, print=pathListing)
|