ggcross | R Documentation |
ggcross
resets the layout ordering index of a stack_cross()
. This
allows you to add other align_*
objects to define a new layout ordering
index. Any objects added after ggcross
will use this updated layout
ordering index. This feature is particularly useful for creating tanglegram
visualizations. ggcross()
is an alias of ggcross()
.
ggcross(mapping = aes(), size = NULL, no_axes = NULL, active = NULL)
ggcross()
initializes a ggplot data
and mapping
.
ggcross()
always applies a default mapping for the axis of the data index
in the layout. This mapping is aes(y = .data$.y)
for horizontal stack
layout (including left and right annotation) and aes(x = .data$.x)
for
vertical stack layout (including top and bottom annotation).
The data in the underlying ggplot
object will contain following columns:
.panel
: The panel for the aligned axis. Refers to the x-axis
for
vertical stack_layout()
(including top and bottom annotations), and the
y-axis
for horizontal stack_layout()
(including left and right
annotations).
.names
(vec_names()
) and .index
(vec_size()
/NROW()
): Character names (if
available) and the integer index of the original data.
.hand
: a factor indicates the index groups.
.x
/.y
and .discrete_x
/.discrete_y
: Integer indices for x
/y
coordinates, and a factor of the data labels (only applicable when names
exist).
It is recommended to use .x
/.y
, or .discrete_x
/.discrete_y
as the
x
/y
mapping.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.