Skip to contents

[Experimental]

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 uses fortify_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() or fortify_data_frame().

theme

A theme() used to render the guides, title, subtitle, caption, margins, patch.title, panel.border, and background. If NULL (default), will inherit from the parent 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

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: the x and y 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.