individual_legend: Creates a small custom legend for one group variable

individual_legendR Documentation

Creates a small custom legend for one group variable

Description

Create a custom legend for one individual group, with the subgroups below

Usage

individual_legend(
  mdf,
  cdf,
  group_name,
  col_name_group = "Top_Phylum",
  col_name_subgroup = "Top_Genus",
  x = "Sample",
  y = "Abundance",
  legend_key_size = 0.4,
  legend_text_size = 10
)

Arguments

mdf

data.frame melted dataframe

cdf

data.frame color dataframe

group_name

name of the larger taxonomic group to extract small legend from

col_name_group

string column name of larger taxonomic group

col_name_subgroup

string column nameof smaller taxonomic group

x

x-value plotted

y

y-value plotted

legend_key_size

numeric determines overall size of the legend keys

legend_text_size

integer determines size of legend text

Value

legend ggplot


KarstensLab/microshades documentation built on June 11, 2024, 11:41 a.m.