Learn R Programming

ggpicrust2 (version 2.5.10)

create_legend_theme: Create Enhanced Legend Theme

Description

Create Enhanced Legend Theme

Usage

create_legend_theme(
  position = "top",
  direction = "horizontal",
  title = NULL,
  title_size = 12,
  text_size = 10,
  key_size = 0.8,
  key_width = NULL,
  key_height = NULL,
  ncol = NULL,
  nrow = NULL,
  box_just = "center",
  margin = ggplot2::margin(0, 0, 0, 0)
)

Value

ggplot2 theme elements

Arguments

position

Legend position ("top", "bottom", "left", "right", "none")

direction

Legend direction ("horizontal", "vertical")

title

Legend title

title_size

Title font size

text_size

Text font size

key_size

Key size in cm

key_width

Key width

key_height

Key height

ncol

Number of columns

nrow

Number of rows

box_just

Legend box justification

margin

Legend margin