Make legend order depending on what the plot will contain.
make_legend_order(
mode,
col_scale = NULL,
size_scale = NULL,
annot_rows_df = NULL,
annot_cols_df = NULL,
legend_order = NULL
)
A list with aesthetics for the main plot and orders of all legends.
Plotting modes.
One or two colour scales (shared for fill and colour). NULL for default, string for Brewer or Viridis, or a scale.
Size scales (NULL or ggplot2 scales).
Annotation data frame for rows.
Annotation data frame for columns.
Numeric vector with legend order. NULL for default.