get_sv_lines_and_arcs_legend.RdCreates a standalone legend showing the five SV orientation categories used in the lines_and_arcs visualization style. Useful for manual plot composition when the embedded legend does not display correctly.
get_sv_lines_and_arcs_legend(
legend_title = "SV Orientation",
text_size = 10,
title_size = 11,
direction = "vertical"
)A ggplot grob containing the legend, suitable for use with
cowplot::plot_grid() or similar layout functions.
if (FALSE) { # \dontrun{
# Create plot without embedded legend
p <- plotCNprofile(CNbins, SV = svs,
sv_style = "lines_and_arcs",
legend.position = "none")
# Get vertical legend (default)
leg <- get_sv_lines_and_arcs_legend()
# Get horizontal legend
leg_horiz <- get_sv_lines_and_arcs_legend(direction = "horizontal")
# Combine
cowplot::plot_grid(p, leg, rel_widths = c(1, 0.2))
} # }