Create custom legends for a domino plot
create_custom_domino_legends(
contrast_levels,
var_positions,
var_id,
contrast,
logfc_colors,
logfc_limits,
color_scale_name,
size_scale_name,
min_dot_size,
max_dot_size,
size_limits = NULL,
size_breaks = NULL,
legend_text_size = 8,
p_label_formatter = function(lp) sprintf("%.2g", 10^-lp)
)
A combined ggplot
object with three aligned legends.
Character vector of contrast level names.
Data frame with variable positions.
Column name for the variable identifier.
Column name for the contrast variable.
Named vector with "low", "mid", "high" colours.
Numeric vector (length 2) for logFC scale limits.
Title for the logFC colour legend.
Title for the p-value size legend.
Numeric dot-size range.
Passed to scale_size_continuous()
.
Base font size for legend text.
A function used to format the size legend labels (typically for p-values). Default is function(lp) sprintf("%.2g", 10^-lp)
.