These functions arrange plots around a main plot, allowing for flexible
alignment of observations in different directions. ggside
is an alias for
quad_free
.
quad_free
/ggside
: Never align observations.quad_alignh
: Align observations in the horizontal direction.quad_alignv
: Align observations in the vertical direction.quad_alignb
: Align observations in both horizontal and vertical directions.
Usage
quad_free(
data = NULL,
mapping = aes(),
...,
theme = NULL,
active = NULL,
width = NA,
height = NA
)
quad_alignh(
data = NULL,
mapping = aes(),
...,
theme = NULL,
active = NULL,
width = NA,
height = NA
)
quad_alignv(
data = NULL,
mapping = aes(),
...,
theme = NULL,
active = NULL,
width = NA,
height = NA
)
quad_alignb(
data = NULL,
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.
For
quad_free
/ggside
, the function usesfortify_data_frame()
to convert the data into a data frame.For all other functions, it employs
fortify_matrix()
to convert the data into a matrix.
- mapping
Default list of aesthetic mappings to use for plot. If not specified, must be supplied in each layer added to the plot.
- ...
Additional arguments passed to
fortify_matrix()
orfortify_data_frame()
.- theme
A
theme()
used to render theguides
,title
,subtitle
,caption
,margins
,patch.title
,panel.border
, andbackground
. IfNULL
(default), will inherit from the parentlayout
.- 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
For quad_alignb
, quad_alignh
, and quad_alignv
, the data input will be
converted into the long formated data frame when drawing. The data in the
underlying ggplot
object contains following columns:
.xpanel
and.ypanel
: the column and row panel.x
and.y
: thex
andy
coordinates.row_names
and.column_names
: A factor 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.