lode-guidance-functions {ggalluvial} | R Documentation |
Lode guidance functions
Description
These functions control the order of lodes within strata in an alluvial
diagram. They are invoked by stat_alluvium()
and can be passed to
the lode.guidance
parameter.
Usage
lode_zigzag(n, i)
lode_zagzig(n, i)
lode_forward(n, i)
lode_rightward(n, i)
lode_backward(n, i)
lode_leftward(n, i)
lode_frontback(n, i)
lode_rightleft(n, i)
lode_backfront(n, i)
lode_leftright(n, i)
Arguments
n |
Numeric, a positive integer |
i |
Numeric, a positive integer at most |
Details
Each function orders the numbers 1 through n
, starting at index
i
. The choice of function made in stat_alluvium()
determines the order in which the other axes contribute to the sorting of
lodes within each index axis. After starting at i
, the functions order
the remaining axes as follows:
-
zigzag
: Zigzag outward fromi
, starting in the outward direction -
zigzag
: Zigzag outward fromi
, starting in the inward direction -
forward
: Increasing order (aliasrightward
) -
backward
: Decreasing order (aliasleftward
) -
frontback
: Proceed forward fromi
ton
, then backward to 1 (aliasrightleft
) -
backfront
: Proceed backward fromi
to 1, then forward ton
(aliasleftright
)
An extended discussion of how strata and lodes are arranged in alluvial
plots, including the effects of different lode guidance functions, can be
found in the vignette "The Order of the Rectangles" via
vignette("order-rectangles", package = "ggalluvial")
.