Learn R Programming

diceplot (version 0.1.7)

create_custom_legends: Create Custom Legends

Description

Creates custom legend plots for cat_c and group.

Usage

create_custom_legends(
  data,
  cat_c,
  group,
  cat_c_colors,
  group_colors,
  var_positions,
  num_vars,
  dot_size
)

Value

A combined ggplot object of the custom legends.

Arguments

data

The original data frame.

cat_c

The name of the cat_c variable.

group

The name of the group variable.

cat_c_colors

A named vector of colors for cat_c.

group_colors

A named vector of colors for the group variable.

var_positions

Data frame with variable positions.

num_vars

Number of variables in cat_c.

dot_size

The size of the dots used in the plot.