unfold {zenplots} | R Documentation |
Unfold the hypercube and produce all information concerning the zenpath and zenplot layout
Description
The unfold()
function imagines each pair of variables/dimensions
as a "face" of a high dimensional cube. These faces are "unfolded" from one 2d space
or "face" to the next about the 1d face or "edge" they share. The unfold()
function takes, as first argument, nfaces
,
the number of 2d plots/spaces to be "unfolded" and produces the zenpath and
zenplot layout required for the function zenplot(). Laying out these pairs
with a zenplot is what is alluded to as an "unfolding" of (at least a part of)
the high dimensional space.
Usage
unfold(nfaces, turns = NULL,
n2dcols = c("letter", "square", "A4", "golden", "legal"),
method = c("tidy", "double.zigzag", "single.zigzag", "rectangular"),
first1d = TRUE, last1d = TRUE, width1d = 1, width2d = 10)
Arguments
nfaces |
The number of faces of the hypercube to unfold |
turns |
A |
n2dcols |
number of columns of 2d plots ( |
method |
The type of zigzag plot (a Available are:
Note that |
first1d |
A |
last1d |
A |
width1d |
A graphical parameter > 0 giving the width of 1d plots. |
width2d |
A graphical parameter > 0 giving the width of 2d plots. |
Value
A list
describing the unfolded path and its layout
as a list of named components:
path
:the path of the unfolding, itself given as a structured
list
having componentsturns
:the sequence of turns – each being one of “l” (for left), “r” (for right), “d” (for down), and “u” (for up) – required to move from the current plot location in the display to the next along the unfolded path.
positions
:the path as a matrix of
(x, y)
positions giving the indices in theoccupancy
matrix of each plot in the path.occupancy
:A rectangular array whose cells indicate the positions of the plots on the page.
layout
:the details of the visual layout of the plots and given as a structured
list
having componentsorientations
:a vector indicating the orientation of each of the displays in order – “h” for horizontal, “v” for vertical, and “s” for square.
dimensions
:a vector giving the dimensionality of each plot in order.
vars
:A matrix of the variable indices to be used in each plot –
x
being the horizontal variable andy
the vertical.layoutWidth
:A positive integer giving the display width of a 2d plot.
layoutHeight
:A positive integer giving the display height of a 2d plot.
boundingBoxes
:A matrix of 4 columns giving locations (
left
,right
,bottom
, andtop
) of the box which bound each of the plots in order.
Note
Although unfold()
is probably rather rarely used directly by a user,
it provides insight into how zenplots are constructed.
Author(s)
Marius Hofert and Wayne Oldford
See Also
Other creating zenplots:
zenplot()
Examples
dim <- 20
unfolding <- unfold(nfaces = dim -1)
names(unfolding)