Learn R Programming

ggcorrheatmap (version 0.1.2)

make_legend_order: Make legend order depending on what the plot will contain.

Description

Make legend order depending on what the plot will contain.

Usage

make_legend_order(
  mode,
  col_scale = NULL,
  size_scale = NULL,
  annot_rows_df = NULL,
  annot_cols_df = NULL,
  legend_order = NULL
)

Value

A list with aesthetics for the main plot and orders of all legends.

Arguments

mode

Plotting modes.

col_scale

One or two colour scales (shared for fill and colour). NULL for default, string for Brewer or Viridis, or a scale.

size_scale

Size scales (NULL or ggplot2 scales).

annot_rows_df

Annotation data frame for rows.

annot_cols_df

Annotation data frame for columns.

legend_order

Numeric vector with legend order. NULL for default.