custom_legend | R Documentation |
A customized legend sections the group taxonomy as headers and lists the subgroup taxonomies below each group header, for all the groups.
custom_legend(
mdf,
cdf,
group_level = "Phylum",
subgroup_level = "Genus",
x = "Sample",
y = "Abundance",
legend_key_size = 0.4,
legend_text_size = 10,
legend_orientation = "vertical"
)
mdf |
data.frame melted dataframe |
cdf |
data.frame color dataframe |
group_level |
string of larger taxonomic group |
subgroup_level |
string of 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 |
legend_orientation |
string determines vertical or horizontal orientation of legend |
complete_legend ggplot
legend_new <- custom_legend(mdf_GP, cdf_GP)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.