Arrange plots in the quad-side of a main plot by aligning discrete axis
Source:R/layout-quad-.R
quad_discrete.Rd
The quad_discrete
function arranges plots in the quad-side of a main plot
by aligning discrete variables along two axes. quad_alignb
is an alias for
quad_discrete
for historical reasons.
Usage
quad_discrete(
data = waiver(),
mapping = aes(),
...,
theme = NULL,
active = NULL,
width = NA,
height = NA
)
quad_alignb(
data = waiver(),
mapping = aes(),
...,
theme = NULL,
active = NULL,
width = NA,
height = NA
)
Arguments
- data
Default dataset to use for the layout. If not specified, it must be supplied in each plot added to the layout. By default, it will try to inherit from parent layout.
fortify_matrix()
will be used to convert data to a matrix.- mapping
Default list of aesthetic mappings to use for main plot in the layout. If not specified, must be supplied in each layer added to the main plot.
- ...
Additional arguments passed to
fortify_matrix()
.- theme
A
theme()
object used to customize various elements of the layout, includingguides
,title
,subtitle
,caption
,margins
,panel.border
, andbackground
. By default, the theme will inherit from the parentlayout
. It also controls the panel spacing for all plots in the layout.- active
A
active()
object that defines the context settings when added to a layout.- width, height
The relative width/height of the main plot, can be a
unit
object.
ggplot2 specification
The data in the underlying main plot contains following columns:
.panel_x
and.panel_y
: the column and row panel groups..x
and.y
: an integer index ofx
andy
coordinates.discrete_x
and.discrete_y
: a factor of the data labels (only applicable when.row_names
and.column_names
exists)..row_names
and.column_names
: A character of the row and column names of the original matrix (only applicable when names exist)..row_index
and.column_index
: the row and column index of the original matrix.value
: the actual matrix value.