Creates 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"
)

Arguments

legend_title

Character string for legend title. Default: "SV Orientation"

text_size

Numeric size for legend text. Default: 10

title_size

Numeric size for legend title. Default: 11

direction

Character string specifying legend direction. Either "vertical" (default) or "horizontal".

Value

A ggplot grob containing the legend, suitable for use with cowplot::plot_grid() or similar layout functions.

Examples

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))
} # }