ggcross {ggalign}R Documentation

Connect two layout crosswise

Description

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().

Usage

ggcross(mapping = aes(), size = NULL, no_axes = NULL, active = NULL)

Arguments

mapping

Default list of aesthetic mappings to use for plot. If not specified, must be supplied in each layer added to the plot.

size

The relative size of the plot, can be specified as a unit(). Note that for circle_layout(), all size values will be interpreted as relative sizes, as this layout type adjusts based on the available space in the circular arrangement.

no_axes

[Experimental] Logical; if TRUE, removes axes elements for the alignment axis using theme_no_axes(). By default, will use the option- "ggalign.align_no_axes".

active

A active() object that defines the context settings when added to a layout.

ggplot2 specification

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:

It is recommended to use .x/.y, or .discrete_x/.discrete_y as the x/y mapping.


[Package ggalign version 1.0.2 Index]